-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Output a consistent format when generating error json #90529
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
b0c0682
Output a consistent format when generating error json
thecoop 4cd9a4e
Update docs/changelog/90529.yaml
thecoop a731fa6
Update changelog with issue number
thecoop cec444a
Update RestResponseTests
thecoop f3d60c8
PR comments
thecoop 6bd5e56
Merge remote-tracking branch 'upstream/main' into exception-json
thecoop 744626c
spotless
thecoop 45b9806
Update docs/changelog/90529.yaml
thecoop 7532693
Update docs/changelog/90529.yaml
thecoop 1e75fce
Update docs/changelog/90529.yaml
thecoop 750eb7d
Update changelog with change details
thecoop 93dc953
Update docs/changelog/90529.yaml
thecoop d293dcb
Match the method parameter types
thecoop 309b076
Merge remote-tracking branch 'upstream/main' into exception-json
thecoop ab3041c
Update docs
thecoop f185846
Merge branch 'main' into exception-json
thecoop 459acf4
Update docs/changelog/90529.yaml
thecoop 32a9f9e
Merge branch 'main' into exception-json
thecoop 02862e9
Revert "Update docs/changelog/90529.yaml"
thecoop 14b55f9
Update docs/changelog/90529.yaml
thecoop dca6d31
Merge branch 'main' into exception-json
thecoop a2548ab
Revert "Update docs/changelog/90529.yaml"
thecoop 8396ba3
Merge branch 'main' into exception-json
elasticmachine 798be45
Merge remote-tracking branch 'upstream/main' into exception-json
thecoop 6f253c4
Add V8 rest API formats for compatibility
thecoop c77abde
Merge branch 'main' into exception-json
thecoop 93da694
Add a basic deprecation warning that the JSON format is changing in v9
thecoop 872699c
Merge branch 'main' into exception-json
thecoop cc2bc6a
Revert "Add a deprecation warning that the JSON format of non-detaile…
thecoop 980a449
Propagate changes from deprecation PRs
thecoop 76f9185
Update tests
thecoop 4726363
Update docs/changelog/90529.yaml
thecoop cb964f0
Revert "Update docs/changelog/90529.yaml"
thecoop aef3b2d
Use more randomness in detailed parameter
thecoop cd81c30
splotless
thecoop 108dd01
Update test
thecoop c4a929c
Merge branch 'main' into exception-json
thecoop 9ccb15c
Don't want stray warnings here
thecoop 66c8b91
Merge branch 'main' into exception-json
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
pr: 90529 | ||
summary: Output a consistent format when generating error json | ||
area: Infra/REST API | ||
type: "breaking" | ||
issues: | ||
- 89387 | ||
breaking: | ||
title: Error JSON structure has changed when detailed errors are disabled | ||
area: REST API | ||
details: |- | ||
This change modifies the JSON format of error messages returned to REST clients | ||
when detailed messages are turned off. | ||
Previously, JSON returned when an exception occurred, and `http.detailed_errors.enabled: false` was set, | ||
just consisted of a single `"error"` text field with some basic information. | ||
Setting `http.detailed_errors.enabled: true` (the default) changed this field | ||
to an object with more detailed information. | ||
With this change, non-detailed errors now have the same structure as detailed errors. `"error"` will now always | ||
be an object with, at a minimum, a `"type"` and `"reason"` field. Additional fields are included when detailed | ||
errors are enabled. | ||
To use the previous structure for non-detailed errors, use the v8 REST API. | ||
impact: |- | ||
If you have set `http.detailed_errors.enabled: false` (the default is `true`) | ||
the structure of JSON when any exceptions occur now matches the structure when | ||
detailed errors are enabled. | ||
To use the previous structure for non-detailed errors, use the v8 REST API. | ||
notable: false |
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
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
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
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
Oops, something went wrong.
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.
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.
Should this change to critical now?
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.
I don't think so, there's (probably) nothing directly for users to do; we consider the existing behaviour a bug, as it's surprising the format changes with non-detailed errors.