ApiExceptionResponseResolver
final class ApiExceptionResponseResolver implements ExceptionResponseResolverInterface (View source)
Converts failures for registered API endpoints into safe Problem Details responses.
Requests outside the API registry remain unclaimed for another HTTP resolver.
Methods
Binds exception classification to canonical endpoint matching and problem response creation.
Details
__construct
__construct(ApiEndpointRequestResolver $endpointResolver, ProblemDetailsFactory $problems)
Binds exception classification to canonical endpoint matching and problem response creation.
resolve
ResponseInterface|null
resolve(Throwable $exception, ServerRequestInterface $request)
Returns a 404 for routing failures, a generic 500 for other API failures, or null outside the API.