Class DatabricksRateLimitException

  • All Implemented Interfaces:
    Serializable, Iterable<Throwable>

    public class DatabricksRateLimitException
    extends DatabricksSQLException
    Exception thrown when a Databricks API call fails due to rate limiting (HTTP 429).

    This exception is used to distinguish rate limit errors from other HTTP errors, enabling special handling such as circuit breaker activation for session creation failures.

    See Also:
    Serialized Form
    • Field Detail

      • HTTP_TOO_MANY_REQUESTS

        public static final int HTTP_TOO_MANY_REQUESTS
        HTTP status code for rate limiting
        See Also:
        Constant Field Values
    • Constructor Detail

      • DatabricksRateLimitException

        public DatabricksRateLimitException​(String message,
                                            int statusCode)
        Constructs a new rate limit exception.
        Parameters:
        message - the detail message
        statusCode - the HTTP status code (should be 429)
      • DatabricksRateLimitException

        public DatabricksRateLimitException​(String message,
                                            Throwable cause,
                                            int statusCode)
        Constructs a new rate limit exception with a cause.
        Parameters:
        message - the detail message
        cause - the cause of this exception
        statusCode - the HTTP status code (should be 429)
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Gets the HTTP status code.
        Returns:
        the status code