Class IntakeExceptionMapper
java.lang.Object
ai.pipestream.connector.intake.error.IntakeExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<IntakeException>
@Provider
public class IntakeExceptionMapper
extends Object
implements jakarta.ws.rs.ext.ExceptionMapper<IntakeException>
Renders every
IntakeException as a uniform, client-safe JSON envelope
and guarantees the real cause is logged server-side, never serialized.
Wire contract: an IntakeErrorResponse (error, code,
optional errorId for server-faults, optional requestId) at the
code's HTTP status — Jackson-serialized, never hand-built. 5xx are logged at
ERROR with the cause (a service fault we must see) and carry a traceable
errorId; 4xx at DEBUG (client mistakes). The x-request-id is echoed as
a response header so a caller can quote it when reporting a failure.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
IntakeExceptionMapper
public IntakeExceptionMapper()
-
-
Method Details
-
toResponse
- Specified by:
toResponsein interfacejakarta.ws.rs.ext.ExceptionMapper<IntakeException>
-