Interface BadGatewayError

All Superinterfaces:
ErrorObject

public interface BadGatewayError extends ErrorObject

Returned when a server-side problem is caused by scaling infrastructure resources.

The client application should retry the request with exponential backoff up to a point where further delay is unacceptable.


Example to create an instance using the builder pattern

     BadGatewayError badGatewayError = BadGatewayError.builder()
             .message("{message}")
             .build()
 
  • Field Details

  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      Plain text description of the error.

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • setMessage

      void setMessage(String message)

      Plain text description of the error.

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • of

      static BadGatewayError of()
      factory method
      Returns:
      instance of BadGatewayError
    • of

      static BadGatewayError of(BadGatewayError template)
      factory method to create a shallow copy BadGatewayError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static BadGatewayError deepCopy(@Nullable BadGatewayError template)
      factory method to create a deep copy of BadGatewayError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static BadGatewayErrorBuilder builder()
      builder factory method for BadGatewayError
      Returns:
      builder
    • builder

      static BadGatewayErrorBuilder builder(BadGatewayError template)
      create builder for BadGatewayError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withBadGatewayError

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

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