Class ServiceUnavailableException

All Implemented Interfaces:
Serializable

public class ServiceUnavailableException extends AxiomException
A server that is temporarily unable to handle the request (503). An optional delay is sent as Retry-After in whole seconds, rounded up.
See Also:
  • Constructor Details

    • ServiceUnavailableException

      public ServiceUnavailableException()
      Creates the exception with code service_unavailable and no Retry-After header.
    • ServiceUnavailableException

      public ServiceUnavailableException(Duration retryAfter)
      Creates the exception with a Retry-After delay.
      Parameters:
      retryAfter - non-negative delay of at most one day
      Throws:
      IllegalArgumentException - for a negative or longer delay
    • ServiceUnavailableException

      public ServiceUnavailableException(Duration retryAfter, String code)
      Creates the exception with a Retry-After delay and a specific safe code.
      Parameters:
      retryAfter - non-negative delay of at most one day
      code - machine-readable code
      Throws:
      IllegalArgumentException - for a negative or longer delay