Interface AgentResponsesErrorResponse
- All Superinterfaces:
ErrorResponse
Error response from a /responses request. Extends ErrorResponse with a threadId for support.
Example to create an instance using the builder pattern
AgentResponsesErrorResponse agentResponsesErrorResponse = AgentResponsesErrorResponse.builder()
.statusCode(1)
.message("{message}")
.plusErrors(errorsBuilder -> errorsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for AgentResponsesErrorResponsebuilder(AgentResponsesErrorResponse template) create builder for AgentResponsesErrorResponse instancecopyDeep()static AgentResponsesErrorResponsedeepCopy(AgentResponsesErrorResponse template) factory method to create a deep copy of AgentResponsesErrorResponse@NotNull @Valid List<ErrorObject>Errors returned for a request.Identifier of the workflow run that raised the error.static AgentResponsesErrorResponseof()factory methodstatic AgentResponsesErrorResponseof(AgentResponsesErrorResponse template) factory method to create a shallow copy AgentResponsesErrorResponsevoidsetErrors(ErrorObject... errors) Errors returned for a request.voidsetErrors(List<ErrorObject> errors) Errors returned for a request.voidsetThreadId(String threadId) Identifier of the workflow run that raised the error.static tools.jackson.core.type.TypeReference<AgentResponsesErrorResponse>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorResponse
getMessage, getStatusCode, setMessage, setStatusCode, withErrorResponse
-
Method Details
-
getErrors
Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Specified by:
getErrorsin interfaceErrorResponse- Returns:
- errors
-
getThreadId
String getThreadId()Identifier of the workflow run that raised the error. Present on errors raised once the workflow has started. Absent on errors raised while parsing the request, before the workflow starts.
- Returns:
- threadId
-
setErrors
Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Specified by:
setErrorsin interfaceErrorResponse- Parameters:
errors- values to be set
-
setErrors
Errors returned for a request.
A single error response can contain multiple errors if the errors are related to the same HTTP status code such as
400.- Specified by:
setErrorsin interfaceErrorResponse- Parameters:
errors- values to be set
-
setThreadId
Identifier of the workflow run that raised the error. Present on errors raised once the workflow has started. Absent on errors raised while parsing the request, before the workflow starts.
- Parameters:
threadId- value to be set
-
of
factory method- Returns:
- instance of AgentResponsesErrorResponse
-
of
factory method to create a shallow copy AgentResponsesErrorResponse- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
AgentResponsesErrorResponse copyDeep()- Specified by:
copyDeepin interfaceErrorResponse
-
deepCopy
@Nullable static AgentResponsesErrorResponse deepCopy(@Nullable AgentResponsesErrorResponse template) factory method to create a deep copy of AgentResponsesErrorResponse- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AgentResponsesErrorResponse- Returns:
- builder
-
builder
create builder for AgentResponsesErrorResponse instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withAgentResponsesErrorResponse
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-