Skip to content

Commit 9af3c2c

Browse files
author
Vianpyro
committed
Simplify error response in login function to enhance security and user experience
1 parent 71df27a commit 9af3c2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routes/authentication.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def login():
109109
password, person["hashed_password"], person["salt"]
110110
):
111111
return jsonify(message="Invalid credentials"), 401
112-
except Exception as e:
113-
return jsonify(message="An error occurred", error=str(e)), 500
112+
except Exception:
113+
return jsonify(message="An internal error occurred"), 500
114114

115115
person_id = person["person_id"]
116116
access_token = generate_access_token(person_id)

0 commit comments

Comments
 (0)