Class ApiKeyCredential.ExchangeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
io.superdurable.dex.ApiKeyCredential.ExchangeException
All Implemented Interfaces:
Serializable
Enclosing class:
ApiKeyCredential

public static final class ApiKeyCredential.ExchangeException extends IOException
Reports a token endpoint, response, transport, or timeout failure.

The message identifies the token URL and HTTP status when available. It includes at most 200 characters from each response error field after redacting the API key, cached and two most recently issued access tokens, the failed response's access token, and JWT-shaped substrings. A JWT-shaped substring has three or more base64url segments of at least 10 characters each. The rule also applies to the token URL and can redact other text of that shape, such as a long dotted host name. It omits raw responses and transport causes. A status of -1 means the exchange did not receive an HTTP response.

See Also:
  • Method Details

    • getHttpStatus

      public int getHttpStatus()
      Returns the token endpoint's HTTP status.
      Returns:
      the status, or -1 when no response arrived