Package eu.vstoyanov.natsy.exception
Class NatsyServerException
-
- All Implemented Interfaces:
-
java.io.Serializable
public class NatsyServerException extends NatsyException
The NATS server rejected the operation.
openrather than sealed: it is both the fallback for API errors natsy does not classify and the base of the two that it does, socatch (e: NatsyServerException)means "the server said no" regardless of which.
-
-
Field Summary
Fields Modifier and Type Field Description private final IntegererrorCodeprivate final IntegerapiErrorCodeprivate final Stringmessageprivate final Throwablecauseprivate final StringlocalizedMessageprivate final Array<Throwable>suppressedprivate Array<StackTraceElement>stackTrace
-
Constructor Summary
Constructors Constructor Description NatsyServerException(String message, Integer errorCode, Integer apiErrorCode, Throwable cause)
-
Method Summary
Modifier and Type Method Description final IntegergetErrorCode()the transport-level code jnats reports - 400, 404, 503 final IntegergetApiErrorCode()the JetStream API code, e.g. -
Methods inherited from class kotlin.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getErrorCode
final Integer getErrorCode()
the transport-level code jnats reports - 400, 404, 503
-
getApiErrorCode
final Integer getApiErrorCode()
the JetStream API code, e.g. 10014 (consumer not found) or 10071 (wrong last sequence).
-1when the server did not send one.
-
-
-
-