HTTPKernel uses explicit failure mapping rather than a single untyped error path.
The package currently ships:
LiquidRazor\HttpKernel\Lib\Runtime\DefaultHttpFailureMapper
It maps package-level failures to:
HttpResponseInterfaceHttpTransportOutputTransportStatus
These currently map to HTTP 400 and TransportStatus::Rejected:
HttpRequestAdaptationFailedHttpRequestBodyNormalizationFailed
These currently map to HTTP 500 and TransportStatus::Failed:
InvalidHttpHandlerResultHttpExecutionFailedHttpResponseEmissionFailed- generic
HttpKernelException - unknown
Throwable
Mapped outputs preserve explicit failure metadata, including:
http_kernel.failure_keyhttp_kernel.failure_classhttp_kernel.failure_messagehttp_kernel.http_status_codehttp_kernel.http_reason_phrasehttp_kernel.transport_status
Existing transport context metadata is preserved alongside the mapped failure metadata.
HTTP status and transport status remain separate.
For example:
- HTTP
404can still be wrapped inTransportStatus::Success - a mapped transport failure can still carry a valid HTTP response object
That separation is preserved by the response finalizer and emitter boundary.