[5.6] [fix/UiSettings] ignore certain errors (#13079)#13409
Merged
spalger merged 5 commits intoelastic:5.6from Aug 22, 2017
Merged
[5.6] [fix/UiSettings] ignore certain errors (#13079)#13409spalger merged 5 commits intoelastic:5.6from
spalger merged 5 commits intoelastic:5.6from
Conversation
e613924 to
1a999c4
Compare
Contributor
Author
|
jenkins, test this |
Contributor
Author
|
@tylersmalley @jbudz I talked with one of you while working on it, but this needed to update Mind taking a look? |
tylersmalley
approved these changes
Aug 18, 2017
Member
tylersmalley
left a comment
There was a problem hiding this comment.
LGTM - also tested with x-pack
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
5.6 specific changes:
9facf4d: Since
SavedObjectClientin 5.6 has_withKibanaIndexAndMappingFallback, which checks for specific error types and uses a fallback request when they are found. This PR changes the error handling to stop overwriting the es errors and instead decorate them withSavedObjectClientspecific details. This means that the error objects no longer havedata.typeattached to them. Thankfully, it also means that they have the entire elasticsearch response available so we can just checkbody.error.typeinstead.[SavedObjectClient] emit detectable errors
[uiSettingsService] consume new SavedObjectsClient errors
[SavedObjectsClient] expose errorTypeHelpers as such
[elasticsearch/tests] recreate error for each test
[http] wait for elasticsearch plugin to be ready
[shortUrl/tests] ensure that create request responds with 200
[shortUrl] use errorTypeHelpers to filter errors
[uiSettings/savedObjectsClientStub] stub errorTypeHelpers
[SavedObjectsClient/errors] expose error module so tests can make errors
[shortUrl/tests] use actual SavedObjectsClient errors
[uiSettings/savedObjectsClientStub] use actual errors lib
[SavedObjectsClient] use decorate instead of "wrap"
[server/routes/uiSettings] refactor routes to forward Boom errors from uiSettings
[uiSettings] colocate routes and service
[testUtils/esTestCluster] use more standard api style
[testUtils/es] add createCallCluster util
[testUtils/esTestCluster] add getters for client/callCluster
[es/healthcheck] ensure that healtcheck stops when server is stopped
[uiSettings/routes] add param/payload validation
[uiSettings/routes] add tests that verify error behaviors