We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc6640a commit 8e81aebCopy full SHA for 8e81aeb
1 file changed
app/api/api_v1/endpoints/login.py
@@ -33,8 +33,9 @@ def login_access_token(
33
},
34
)
35
36
- if login.status_code == 400:
37
- raise HTTPException(status_code=400, detail="Login failed.")
+ if login.status_code // 100 != 2:
+ raise HTTPException(status_code=400, detail="Login failed, bad credentials.")
38
+
39
return Token(
40
access_token=login.json()["access"],
41
token_type="bearer",
0 commit comments