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 Modifier and Type Field Description static intHTTP_TOO_MANY_REQUESTSHTTP status code for rate limiting
-
Constructor Summary
Constructors Constructor Description 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 Modifier and Type Method Description intgetStatusCode()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 messagestatusCode- the HTTP status code (should be 429)
-
-