mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
fixed potential for not passing in an error message and triggering an unhandled exception (#96413)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
9d14256383
commit
839ab6c1ba
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ export const handleEsError = ({
|
|||
return response.customError({
|
||||
statusCode,
|
||||
body: {
|
||||
message: body.error?.reason,
|
||||
message: body.error?.reason ?? error.message ?? 'Unknown error',
|
||||
attributes: {
|
||||
// The full original ES error object
|
||||
error: body.error,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue