Wrap only a handler's invocation in an endpoint-checked error policy.
Requires explicit .responses() declarations. Every possible translated
status/body must fit the endpoint; file/raw/stream escape hatches are not
accepted. Request and injected-service types are unchanged. Authentication,
validation, middleware, DI and response serialization remain outside this
wrapper and use the server's normal error handling.
Wrap only a handler's invocation in an endpoint-checked error policy.
Requires explicit
.responses()declarations. Every possible translated status/body must fit the endpoint; file/raw/stream escape hatches are not accepted. Request and injected-service types are unchanged. Authentication, validation, middleware, DI and response serialization remain outside this wrapper and use the server's normal error handling.