Class QTSError

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
QTSAuthError, QTSCanceledError, QTSDownloadError, QTSExecutionError, QTSPreparationError, QTSStrategyCompileError, QTSTimeoutError, QTSUploadError

public class QTSError extends RuntimeException
Root of the QTSurfer SDK exception hierarchy. All SDK errors are unchecked; consumers can catch QTSError to handle any SDK-specific failure, or match on subclasses to react to a specific stage.
See Also:
  • Constructor Details

    • QTSError

      public QTSError(String message)
    • QTSError

      public QTSError(String message, Throwable cause)
  • Method Details

    • getStatusCode

      public OptionalInt getStatusCode()
      Returns:
      the HTTP status when this error originated in an API response
    • getResponseError

      public Optional<com.qtsurfer.api.client.model.ResponseError> getResponseError()
      Returns:
      the structured server error when the response body has that shape
    • getReason

      public Optional<String> getReason()
      Returns:
      a stable cause token; handle unknown tokens like an absent reason
    • getNext

      public Optional<com.qtsurfer.api.client.model.ErrorNextCall> getNext()
      Returns:
      a suggested recovery request; the SDK never executes it automatically
    • getResponseHeaders

      public Optional<HttpHeaders> getResponseHeaders()
      Returns:
      response headers, including Retry-After, when available