-
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
[fix/UiSettings] ignore certain errors #13079
[fix/UiSettings] ignore certain errors #13079
Conversation
03e2e31
to
a5892fc
Compare
Getting
|
8618519
to
e9ce550
Compare
e9ce550
to
304fd9e
Compare
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 - I like the file layout you ended up with in client/lib/errors.js
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.
Came back to my instance this morning and the logs were flooded with the following:
server log [07:56:57.158] [warning][process] Error: Cannot provide statusCode or message with boom error
at Object.exports.assert (/Users/tyler/elastic/kibana/node_modules/hoek/lib/index.js:736:11)
at Object.exports.wrap (/Users/tyler/elastic/kibana/node_modules/boom/lib/index.js:96:10)
at uiSettings.set.then.catch.err (/Users/tyler/elastic/kibana/src/core_plugins/kibana/server/routes/api/settings/register_set.js:18:34)
…gs/ignoreable-errors
…gs/ignoreable-errors
…gs/ignoreable-errors
…gs/ignoreable-errors
…gs/ignoreable-errors
dcd46d8
to
256a0b2
Compare
@tylersmalley fixed the tests |
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. Also verified errors are now bubbling up for invalid login attempts.
* [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 (cherry picked from commit 8a64872)
* [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 (cherry picked from commit 8a64872)
In #9214 we started ignoring certain elasticsearch errors in the
UiSettings
service. In #12747 we moved to using the SavedObjectsClient for communication with elasticsearch, which meant that we were getting different errors back and this broke the error ignoring characteristics of theUiSettings
service.The majority of the code is ready to go, but I need to write some tests that will fail in case this type of change happens again.