Record Class IntakeErrorResponse
java.lang.Object
java.lang.Record
ai.pipeline.connector.intake.error.IntakeErrorResponse
public record IntakeErrorResponse(String error, String code, String errorId, String requestId, String token)
extends Record
Uniform, client-safe error body. Serialized by Jackson — never hand-built — so
values are always correctly escaped and nothing can inject into the response.
Empty fields are omitted: errorId only appears for server-faults
(5xx), requestId only when the client supplied a correlation id, and
token only when a doc_id was derived (so the client can poll the
outcome via the status lookup).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.errorId()Returns the value of theerrorIdrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of therequestIdrecord component.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IntakeErrorResponse
public IntakeErrorResponse(String error, String code, String errorId, String requestId, String token) Creates an instance of aIntakeErrorResponserecord class.- Parameters:
error- the value for theerrorrecord componentcode- the value for thecoderecord componenterrorId- the value for theerrorIdrecord componentrequestId- the value for therequestIdrecord componenttoken- the value for thetokenrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
errorId
Returns the value of theerrorIdrecord component.- Returns:
- the value of the
errorIdrecord component
-
requestId
Returns the value of therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-