-
Notifications
You must be signed in to change notification settings - Fork 937
fix(site): ensure empty string error shows default message #10196
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
✔️ PR 10196 Updated successfully.
|
Testing this now. |
@Kira-Pilot issue is still there |
@matifali can you please share the payload/response from the network errors? I'm guessing the BE maybe is sending an error message with an empty space. 🤔 |
There is no backend. This happens when the coder is down. So network logs have either 503 or 403 errors. |
return error.response.data.message; | ||
} | ||
if (typeof error === "string") { | ||
// if error is a non-empty string | ||
if (error && typeof error === "string") { |
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.
even though this wasn't the fix for this bug, I'm keeping it because we should guard against empty strings anyway
@BrunoQuaresma @matifali pushed another fix that has been tested thanks to Atif's PR deployment. Can you take another look when you get a chance? |
We have verified that it is resolved. Thanks @Kira-Pilot |
|
resolves #9042
If we get a 404 or similar, Axios still creates a response body (with a missing message). We were not checking for this.
With this fix, we will still see an error banner because the API has stopped responding; however, now it is populated with our default message:
