report: Provide user information for browser-side errors.

b4dd118aa1 changed how the `user_info_str` parsed information out of
the events it received -- but only changed the server errors, not the
browser errors, though both use the same codepath.  As a result, all
browser errors since then have been incorrectly marked as being for
anonymous users.

Build and pass in the expected `user` dict into the event.
This commit is contained in:
Alex Vandiver
2023-03-03 21:31:50 +00:00
committed by Tim Abbott
parent ce5d13f9b2
commit 90b1e0b8b9
3 changed files with 9 additions and 9 deletions

View File

@@ -81,9 +81,8 @@ Deployed version: {version}
def zulip_browser_error(report: Dict[str, Any], error_bot_email: str) -> None:
email_subject = "JS error: {user_email}".format(**report)
user_info = user_info_str(report)
email_subject = f"JS error: {user_info}"
body = f"User: {user_info}\n"
body += "Message: {message}\n".format(**report)