[Fleet] allow optional statusCode and error in generic error response schema (#193604)

Relates https://github.com/elastic/kibana/issues/184685
Make statusCode and error optional in genericErrorResponse, sometimes it
seems to be missing.

Saw this screenshot in another issue: 

![image](https://github.com/user-attachments/assets/f2cdf0a4-9067-4c36-a98f-65dc302a4e55)
This commit is contained in:
Julia Bardi 2024-09-20 19:05:03 +02:00 committed by GitHub
parent 486b16e56f
commit 4437337dd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,8 +10,8 @@ import { schema } from '@kbn/config-schema';
export const genericErrorResponse = () =>
schema.object(
{
statusCode: schema.number(),
error: schema.string(),
statusCode: schema.maybe(schema.number()),
error: schema.maybe(schema.string()),
message: schema.string(),
},
{