oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

feat: allow `StatusCode()` for `error`s returned in Strict Server

Open jamietanna opened this issue 1 year ago • 2 comments

To allow controlling what actually gets returned

jamietanna avatar Apr 19 '24 10:04 jamietanna

May be trivial to do it yourself with the provided error handler

jamietanna avatar Apr 20 '24 08:04 jamietanna

Returning an echo.ErrFoo as the error should properly be unwrapped and the correct response code returned.

Not sure if this is the ideal implementation tho as it leaks using echo into the strict implementation. Also not sure if that is worse that duplicating the already-existing error response codes.

deefdragon avatar Apr 29 '24 03:04 deefdragon