Package com.jsgalactic.axiom.error
Class ServiceUnavailableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.jsgalactic.axiom.error.AxiomException
com.jsgalactic.axiom.error.ServiceUnavailableException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionCreates the exception with codeservice_unavailableand no Retry-After header.ServiceUnavailableException(Duration retryAfter) Creates the exception with a Retry-After delay.ServiceUnavailableException(Duration retryAfter, String code) Creates the exception with a Retry-After delay and a specific safe code. -
Method Summary
Methods inherited from class com.jsgalactic.axiom.error.AxiomException
code, headers, status, violationsMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ServiceUnavailableException
public ServiceUnavailableException()Creates the exception with codeservice_unavailableand no Retry-After header. -
ServiceUnavailableException
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
Creates the exception with a Retry-After delay and a specific safe code.- Parameters:
retryAfter- non-negative delay of at most one daycode- machine-readable code- Throws:
IllegalArgumentException- for a negative or longer delay
-