kibana/test/api_integration/apis/saved_queries/index.js
Lukas Olson 57b7efc3eb
Update error handling for saved query service (#163904)
## Summary

Resolves https://github.com/elastic/kibana/issues/153497.

Updates the saved query service to properly handle & return errors from
the saved object client. Instead of displaying "internal server error"
and returning 500, specific error messages occur for corresponding saved
object client errors.

After:


![image](f8ba7b90-77fe-4db9-8377-0a1f878fe3a0)

### To do

- [x] API integration tests

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-22 13:09:00 -07:00

13 lines
498 B
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export default function ({ loadTestFile }) {
describe('Saved queries', () => {
loadTestFile(require.resolve('./saved_queries'));
});
}