-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Workplace Search] Fix bug where error was behind modal stuck in loading state #104360
[Workplace Search] Fix bug where error was behind modal stuck in loading state #104360
Conversation
In elastic#104024, the error handling incorrectly used the `message` property on the response, when it should have been the attributes.errors array.
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.
LGTM 👍
…ing state (elastic#104360) * Fix an issue from previous PR In elastic#104024, the error handling incorrectly used the `message` property on the response, when it should have been the attributes.errors array. * Use inline error for duplicate name
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…ing state (elastic#104360) * Fix an issue from previous PR In elastic#104024, the error handling incorrectly used the `message` property on the response, when it should have been the attributes.errors array. * Use inline error for duplicate name
…ing state (#104360) (#104636) * Fix an issue from previous PR In #104024, the error handling incorrectly used the `message` property on the response, when it should have been the attributes.errors array. * Use inline error for duplicate name Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
I see this PR was merged into |
Backporting this as part of a dependent backport in #104702 |
…ing state (elastic#104360) * Fix an issue from previous PR In elastic#104024, the error handling incorrectly used the `message` property on the response, when it should have been the attributes.errors array. * Use inline error for duplicate name
) * [Enterprise Search] Fix bug in Add Schema modal (#104024) * [Enterprise Search] Fix bug in Add Schema modal This PR fixes a bug where an error passed from the server was not rendering and was causing the UI to hang. The problem is that the `body` property was missed in the error object. * Use default message when error response for actions.setServerField has no message * i18n-ize default error message * Remove TODO Co-authored-by: Byron Hulcher <byronhulcher@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> * [Workplace Search] Fix bug where error was behind modal stuck in loading state (#104360) * Fix an issue from previous PR In #104024, the error handling incorrectly used the `message` property on the response, when it should have been the attributes.errors array. * Use inline error for duplicate name Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co> Co-authored-by: Byron Hulcher <byronhulcher@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
fixes https://github.com/elastic/workplace-search-team/issues/1831
Summary
This PR accomplishes 2 things:
Before
After
The issue is that this is the shape of the server error response:
I mistakingly used the
message
prop, which is a string, when the UI expects an array of strings, whichattributes.errors
is.Checklist