Skip to content
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

[BUG] custom error not display correctly after dev tool console refactoring #3645

Closed
abbyhu2000 opened this issue Mar 21, 2023 · 5 comments · Fixed by #3652
Closed

[BUG] custom error not display correctly after dev tool console refactoring #3645

abbyhu2000 opened this issue Mar 21, 2023 · 5 comments · Fixed by #3652
Assignees
Labels
bug Something isn't working multiple datasource multiple datasource project v2.7.0

Comments

@abbyhu2000
Copy link
Member

Describe the bug
The error is caused by #3544

To Reproduce
If search for an index pattern that does not exist, the console shows a 502 bad gateway error:
Screen Shot 2023-03-21 at 1 18 18 PM

It should show a 404 not found custom error:
Screen Shot 2023-03-21 at 1 18 57 PM

@abbyhu2000 abbyhu2000 added the bug Something isn't working label Mar 21, 2023
@zhongnansu
Copy link
Member

zhongnansu commented Mar 22, 2023

@abbyhu2000 The issue is with a typo. it's supposed to be headers not header. This is leading isResponseErrorFlag to always be false, and not forwarding the error message to response. I'll fix it in next PR

return Boolean(error && error.body && error.statusCode && error.header);

@joshuarrrr
Copy link
Member

It sounds like this is a blocker for the feature in 2.7.0

@AMoo-Miki
Copy link
Collaborator

@abbyhu2000 The issue is with a typo. it's supposed to be headers not header. This is leading isResponseErrorFlag to always be false, and not forwarding the error message to response. I'll fix it in next PR

return Boolean(error && error.body && error.statusCode && error.header);

Why do we care if the response has any headers?

@zhongnansu
Copy link
Member

@abbyhu2000 The issue is with a typo. it's supposed to be headers not header. This is leading isResponseErrorFlag to always be false, and not forwarding the error message to response. I'll fix it in next PR

return Boolean(error && error.body && error.statusCode && error.header);

Why do we care if the response has any headers?

to validate the error is a response error

@zhongnansu
Copy link
Member

zhongnansu commented Mar 22, 2023

I've posted PR #3652 to fix the problem. Please take a look, let's unblock it for 2.7
@abbyhu2000 @joshuarrrr @AMoo-Miki

@joshuarrrr joshuarrrr added the multiple datasource multiple datasource project label Mar 23, 2023
@kavilla kavilla linked a pull request Mar 23, 2023 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working multiple datasource multiple datasource project v2.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants