This PR applies proper error formatting to match the OpenAPI spec, by implementing a custom ErrorHandlerFunc function. This also introduces some generic error types (e.g., UnauthorizedError or NotFoundError) which should be used by custom backends).
Some test cases are added to verify errors added are correctly formatted to a Response type.
This PR applies proper error formatting to match the OpenAPI spec, by implementing a custom
ErrorHandlerFunc
function. This also introduces some generic error types (e.g.,UnauthorizedError
orNotFoundError
) which should be used by custom backends).Some test cases are added to verify errors added are correctly formatted to a
Response
type.Fixes CSS-7327