Interface AgentResponsesErrorResponse

All Superinterfaces:
ErrorResponse

public interface AgentResponsesErrorResponse extends 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 Details

    • getErrors

      @NotNull @Valid @NotNull @Valid List<ErrorObject> 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:
      getErrors in interface ErrorResponse
      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

      void setErrors(ErrorObject... errors)

      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:
      setErrors in interface ErrorResponse
      Parameters:
      errors - values to be set
    • setErrors

      void setErrors(List<ErrorObject> errors)

      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:
      setErrors in interface ErrorResponse
      Parameters:
      errors - values to be set
    • setThreadId

      void setThreadId(String threadId)

      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

      Specified by:
      copyDeep in interface ErrorResponse
    • 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

      default <T> T withAgentResponsesErrorResponse(Function<AgentResponsesErrorResponse,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<AgentResponsesErrorResponse> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference