Mbonea commited on
Commit
8240ca0
1 Parent(s): 4649066

exception handling

Browse files
App/Transcription/TranscriptionRoutes.py CHANGED
@@ -103,8 +103,10 @@ async def create_file(
103
  while contents := await file.read(1024 * 1):
104
  await f.write(contents)
105
 
106
- except Exception:
107
- return {"message": "There was an error uploading the file"}
 
 
108
  finally:
109
  await file.close()
110
 
 
103
  while contents := await file.read(1024 * 1):
104
  await f.write(contents)
105
 
106
+ except Exception as e:
107
+ return {
108
+ "message": f"There was an error uploading the file, error message {str(e)} "
109
+ }
110
  finally:
111
  await file.close()
112