Skip to content

Commit

Permalink
made error msg more detailed
Browse files Browse the repository at this point in the history
  • Loading branch information
n1lby73 committed Dec 18, 2023
1 parent 7377ed4 commit 0e78b0c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web-ui/webApp/apiRoute.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def post(self):
otp, otpStartTime = genOTP()

global genOtpStartTime

genOtpStartTime = otpStartTime

msg = Message('Email Verification', recipients=[email])
Expand Down Expand Up @@ -562,9 +562,11 @@ def get(self):

db.session.close()

except:
except Exception as e:

error_message = str(e)

return ({"error": "OTP generation failed"}), 500
return ({"error": "OTP generation failed", "Details": str(e)}), 500

class genOtpApi(Resource):
@jwt_required()
Expand Down

0 comments on commit 0e78b0c

Please sign in to comment.