Package com.databricks.jdbc.exception

## Class DatabricksRateLimitException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.sql.SQLException
      - - com.databricks.jdbc.exception.DatabricksSQLException
        - - com.databricks.jdbc.exception.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 Summary

Fields
`static int` `HTTP_TOO_MANY_REQUESTS` HTTP status code for rate limiting

### Constructor Summary

Constructors
`DatabricksRateLimitException​(String message, int statusCode)` Constructs a new rate limit exception.
`DatabricksRateLimitException​(String message, Throwable cause, int statusCode)` Constructs a new rate limit exception with a cause.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getStatusCode()` Gets the HTTP status code.

### Methods inherited from class java.sql.SQLException

`getErrorCode, getNextException, getSQLState, iterator, setNextException`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### 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