Skip to content

Commit 73d60fa

Browse files
committed
Improve auth fail error response and logging.
1 parent 29204c7 commit 73d60fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: locust/web.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@ def wrapper(*args, **kwargs):
628628
session["auth_info"] = None
629629
return login_required(view_func)(*args, **kwargs)
630630
except Exception as e:
631-
return f"Locust auth exception: {e} See https://docs.locust.io/en/stable/extending-locust.html#adding-authentication-to-the-web-ui for configuring authentication."
631+
logger.exception("Locust auth exception")
632+
return f"Locust auth exception: {e}<br/><br/>See https://docs.locust.io/en/stable/extending-locust.html#adding-authentication-to-the-web-ui for configuring authentication, or disable login by removing --web-login argument."
632633
else:
633634
return view_func(*args, **kwargs)
634635

0 commit comments

Comments
 (0)