-
Couldn't load subscription status.
- Fork 17
IBX-10125: Handled image upload failed request #1609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| const getErrorMessageObject = (response) => { | ||
| const responseErrorMessage = response.json().then((jsonResponse) => { | ||
| return jsonResponse.ErrorMessage; | ||
| return jsonResponse.ErrorMessage ?? jsonResponse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With HTTP error code other than 2XX, response.ok below will be false.
I would treat jsonResponse.ErrorMessage not being set as an error in this function, and throw an Error. Otherwise you return an object instead of string, and there is a high likelihood that follow up code will fail on that instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Steveb-p Actually, it seems that jsonResponse.ErrorMessage was meant to be an object, not a string. This is especially visible here:
| const responseErrorMessageObject = await getErrorMessageObject(response); |
jsonResponse
c490353 to
37c00d8
Compare
37c00d8 to
64f87ea
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Approved
Regression: ibexa/commerce#1396



Description:
Two things:
jsonResponse.ErrorMessagecall was giving empty results. Shouldn't we rather fallback to full response?For QA:
Documentation: