h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Allow arbitrary additional props to be passed to `createError`

Open hymair opened this issue 1 year ago • 1 comments

Describe the feature

I want to send an additional prop in my error responses. For example code: "invitation_not_found" and I don't want it to be under data, but in the root error object.

Additional information

  • [ ] Would you be willing to help implement this feature?

hymair avatar Jun 08 '24 07:06 hymair

I have similar expectations about putting additional information in the root. Any updates?

RobertHaba avatar Sep 12 '24 18:09 RobertHaba

Latest v2 will allow new HTTPError({ body: {} }) to add more keys to top level of JSON response object.

pi0 avatar Jun 05 '25 21:06 pi0