Skip to content

Commit

Permalink
fix: metric name typo after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
stchris committed Oct 14, 2024
1 parent 2ce762e commit dee56a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aleph/views/sessions_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ def password_login():
try:
role = Role.login(data.get("email"), data.get("password"))
except PasswordCredentialsError:
AUTH_ATTEMPS.labels(method="password", result="failed").inc()
AUTH_ATTEMPTS.labels(method="password", result="failed").inc()
# Raising a 400 error in this and the following case is technically
# not 100% correct. This seems to have been introduced in order to simplify
# error handling in the frontend. Raising a 401 error triggers a
# hard page reload and state invalidation etc.
raise BadRequest(gettext("Invalid user or password."))
except RoleBlockedError:
AUTH_ATTEMPS.labels(method="password", result="failed").inc()
AUTH_ATTEMPTS.labels(method="password", result="failed").inc()
return jsonify(
{
"status": "error",
Expand Down Expand Up @@ -139,7 +139,7 @@ def oauth_callback():
try:
role = handle_oauth(oauth.provider, oauth_token)
except OAuthError:
AUTH_ATTEMPS.labels(method="oauth", result="failed").inc()
AUTH_ATTEMPTS.labels(method="oauth", result="failed").inc()
raise err
except RoleBlockedError:
error_url = ui_url("oauth", status="error", code=403)
Expand Down

0 comments on commit dee56a6

Please sign in to comment.