Class RevetsecException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AccessTokenValidationException, InvalidSealedStateException, JoseException, JwksUnavailableException, JwsSigningException, KeyImportException, OAuthClientMetadataCacheException, OAuthException, OAuthServerException, OidcException, OidcLogoutException, ScimResourceWorkLimitException
Programmer misuse, such as a null argument or an out-of-range setting, throws
NullPointerException, IllegalArgumentException or IllegalStateException instead.
Every instance has:
- an
ErrorCategory(getCategory()); - a temporary condition flag (
isTemporaryCondition()) set by the documented failure category, reason, cause and response status. Only selectedErrorCategory.TRANSPORTconditions (timeout, I/O failure or a held-back request) andErrorCategory.REMOTE_ERRORresponses (HTTP 429/5xx or OAuthtemporarily_unavailable) may be marked temporary. This is not an effect or replay verdict; - a fixed, one-sentence message that never contains input, tokens, keys or other secrets;
- no cause, except the JDK
IOExceptionbehind aErrorCategory.TRANSPORTfailure; - suppression disabled, so
Throwable.addSuppressed(Throwable)does nothing andThrowable.getSuppressed()is always empty.
- Since:
- 1.0.0
- Author:
- Mark Allen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal @NonNull ErrorCategoryReturns the category of this failure.Returns whether this failure is classified as a temporary condition.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getCategory
Returns the category of this failure.- Returns:
- the category of this failure
- Since:
- 1.0.0
-
isTemporaryCondition
Returns whether this failure is classified as a temporary condition.It is
trueonly for aErrorCategory.TRANSPORTfailure caused by a timeout or an I/O error, or by a request Revetsec held back so that it can be sent later, and for aErrorCategory.REMOTE_ERRORwith HTTP status 429 or 5xx or the OAuth errortemporarily_unavailable. It is alwaysfalsefor an interrupted thread and for every other category. Documented fixed outcome reasons, including an unknown commit or a known commit whose output was withheld, retain their false classification even if a separately authorized later operation could succeed.This classification supplies no permission to replay an operation. Neither value establishes whether a request was sent, whether earlier work had effects, whether a credential remains usable, or whether the operation is idempotent. A timeout, HTTP 429/5xx or OAuth
temporarily_unavailablecan follow remote consumption or commitment. A false value does not establish a permanent condition or zero effects. Follow the particular operation's effect, pending-state and reconciliation contract; do not automatically repeat a code redemption, rotating refresh, callback, credential mutation or application action.- Returns:
- whether this failure is classified as a temporary condition
- Since:
- 1.0.0
-