From 28fabda7bf7cf3b753e6ec6b0d07bdfc7af5512b Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 27 Dec 2025 15:23:25 -0500 Subject: [PATCH] try catcg --- app/api/routes/routes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/api/routes/routes.py b/app/api/routes/routes.py index 3c01a96..5ba124a 100644 --- a/app/api/routes/routes.py +++ b/app/api/routes/routes.py @@ -142,7 +142,14 @@ def upload_file(): filename = secure_filename(file.filename) final_save_path = os.path.join(UPLOAD_FOLDER, filename) logger.info(f'POST CALLED 6 {final_save_path}') - file.save(final_save_path) + + try: + file.save(final_save_path) + except Exception as e: + # Catches any other exception and stores the message in 'e' + print(f"An unexpected error occurred: {e}") + + if request.method == 'GET': logger.info('GET CALLED')