vercel / micro

Asynchronous HTTP microservices
MIT License
10.59k stars 459 forks source link

feat: add params to http error #487

Open chernodub opened 5 months ago

chernodub commented 5 months ago

Added the params for more convenient initialization of the error.

Currently, it's only possible to set the status code imperatively like here https://github.com/vercel/micro/blob/9db5838990ef9a7223d0efa9dee9154febd92aeb/test/suite/index.ts#L245