Class DexServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.superdurable.dex.exceptions.DexServiceException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ChannelMessageNotFoundException, FlowAlreadyStartedException, FlowClosingException, FlowNotActiveOrNotFoundException, FlowNotFoundException, LongPollTimeoutException, RequestTimeoutException, RpcLockConflictException, WorkerInvocationException
Reports a Dex API failure translated from a gRPC response.
Inspect the standard gRPC getCode() first and the optional Dex
getSubStatus() when application recovery needs a more precise category. Prefer a
concrete subclass such as FlowNotFoundException for expected outcomes and use this base
type for diagnostics or uncategorized service failures.
try {
client.describeFlow("order-123");
} catch (FlowNotFoundException missing) {
createOrder();
} catch (DexServiceException serviceFailure) {
log.error("Dex {}: {}", serviceFailure.getCode(), serviceFailure.getDetail());
}
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDexServiceException(io.grpc.Status.Code code, ErrorSubStatus subStatus, String detail, Throwable cause) Creates a service exception with transport and Dex-specific status metadata. -
Method Summary
Modifier and TypeMethodDescriptionio.grpc.Status.CodegetCode()Returns the standard gRPC status code.Returns the server-provided error detail.Returns the Dex-specific error category.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DexServiceException
public DexServiceException(io.grpc.Status.Code code, ErrorSubStatus subStatus, String detail, Throwable cause) Creates a service exception with transport and Dex-specific status metadata.- Parameters:
code- the nonnull gRPC status codesubStatus- the Dex-specific category, ornullwhen unavailabledetail- the server-provided error detail, which may benullcause- the original transport failure, which may benull
-
-
Method Details
-
getCode
public io.grpc.Status.Code getCode()Returns the standard gRPC status code.- Returns:
- the nonnull gRPC code
-
getSubStatus
Returns the Dex-specific error category.- Returns:
- the category, or
nullwhen none was supplied or recognized
-
getDetail
Returns the server-provided error detail.- Returns:
- the detail, which may be
null
-