Class IntakeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ai.pipeline.connector.intake.error.IntakeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HttpIntakeException, IntakeServiceException
Base type for every failure the intake HTTP surface deliberately surfaces.
An IntakeException is the boundary between what went wrong
internally (the cause — logged, never serialized)
and what the client is told (the code() plus
clientMessage() — curated, safe, stable).
Anything thrown out of a resource that is not an
IntakeException is treated as an unexpected internal error: callers
are expected to translate upstream/runtime failures into one of these so
that IntakeExceptionMapper can render a uniform envelope and no raw
message ever reaches the wire.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIntakeException(IntakeErrorCode code, String clientMessage, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionClient message with the errorId appended for server-faults — for surfaces (gRPC in-band responses) that have no dedicated errorId field yet.Safe, client-facing message.code()errorId()Unique, traceable id for a server-fault occurrence; empty for client rejections.intbooleanisError()truewhen this is a server-side error (5xx) rather than a client rejection (4xx).The status-tracking token, or empty when no doc_id was derivable before the failure.withTrackingToken(String token) Attach the status-tracking token (when a doc_id was derived).Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IntakeException
-
-
Method Details
-
code
-
httpStatus
public int httpStatus() -
isError
public boolean isError()truewhen this is a server-side error (5xx) rather than a client rejection (4xx). An error is not the caller's fault — even a valid account can hit one — so it carries a traceableerrorId(). -
errorId
Unique, traceable id for a server-fault occurrence; empty for client rejections. Clock-derived (not a UUID, never random) and support-quotable. -
clientMessage
Safe, client-facing message. Never contains upstream or internal detail; the real failure lives inThrowable.getCause()and is only ever logged. -
clientFacingMessage
Client message with the errorId appended for server-faults — for surfaces (gRPC in-band responses) that have no dedicated errorId field yet. -
withTrackingToken
Attach the status-tracking token (when a doc_id was derived). Returns this for fluent rethrow. -
trackingToken
The status-tracking token, or empty when no doc_id was derivable before the failure.
-