ERA-13244: Fix HTTP errors showing "unknown error" instead of human-readable message on event submit#1561
Open
jeslefcourt wants to merge 2 commits into
Open
ERA-13244: Fix HTTP errors showing "unknown error" instead of human-readable message on event submit#1561jeslefcourt wants to merge 2 commits into
jeslefcourt wants to merge 2 commits into
Conversation
…-13244) Fixes generateErrorMessageForRequest checking error.response?.status?.code (always undefined on an Axios number status) instead of error.response?.status, and updates the ReportDetailView error catch block to use it so 429 and other HTTP errors show their localized message instead of "unknown error". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Details generateErrorMessageForRequest crashes when called with undefined (e.g. when Promise.reject() is called with no value). Guard with a null check before calling it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
luixlive
requested changes
May 22, 2026
Contributor
luixlive
left a comment
There was a problem hiding this comment.
Trivial and sound. I just think we need to double check if that change in generateErrorMessageForRequest is correct.
|
|
||
| if (error.response?.status?.code) { | ||
| switch (error.response.status.code) { | ||
| if (error.response?.status) { |
Contributor
There was a problem hiding this comment.
Hmm this code has been there for a while. It seems risky to change it suddenly. I just tested an erroneous call on our Open API:

I see the code under status.code. Maybe we need to add some sort of intelligent condition here?
const statusCode = error.response?.status?.code ?? error.response?.status;
switch (statusCode) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
generateErrorMessageForRequestinsrc/utils/request.jswhich was checkingerror.response?.status?.code— Axios puts the HTTP status code aterror.response.status(a number), so.codewas alwaysundefinedand the switch never matched any casegenerateErrorListForApiResponseDetailscatch block inReportDetailViewto callgenerateErrorMessageForRequestinstead of always falling back to "unknown error"Test plan
Jira: ERA-13244
🤖 Generated with Claude Code