Class EquinixServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
api.equinix.javasdk.core.exception.BaseException
api.equinix.javasdk.core.exception.EquinixClientException
api.equinix.javasdk.core.exception.EquinixServiceException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EquinixAuthenticationException,EquinixAuthorizationException,EquinixConflictException,EquinixNotFoundException,EquinixRateLimitException,EquinixServerException
Thrown when the Equinix API returns an error HTTP response.
This is the base class for all API error exceptions. It carries the HTTP status code, response headers, request path, and structured error details from the API response body. Specific HTTP status codes are mapped to typed subclasses:
| HTTP Status | Exception Class |
|---|---|
| 401 Unauthorized | EquinixAuthenticationException |
| 403 Forbidden | EquinixAuthorizationException |
| 404 Not Found | EquinixNotFoundException |
| 409 Conflict | EquinixConflictException |
| 429 Too Many Requests | EquinixRateLimitException |
| 5xx Server Error | EquinixServerException |
Error Handling
try {
Connection conn = fabric.connections().getByUuid("uuid");
} catch (EquinixNotFoundException e) {
System.err.println("Not found: " + e.getStatusCode());
} catch (EquinixServiceException e) {
System.err.println("API error: " + e.getMessage());
}
- Version:
- $Id: $Id
- Author:
- ianjones
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEquinixServiceException(String errorMessage) Constructor for EquinixServiceException.EquinixServiceException(String errorMessage, Exception cause) Constructor for EquinixServiceException. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EquinixServiceException
-
EquinixServiceException
-
-
Method Details
-
getMessage
getMessage.
- Overrides:
getMessagein classThrowable- Returns:
- a
Stringobject.
-