public class CMAHttpException extends RuntimeException
| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER_RATE_LIMIT_HOUR_LIMIT |
static String |
HEADER_RATE_LIMIT_HOUR_REMAINING |
static String |
HEADER_RATE_LIMIT_RESET |
static String |
HEADER_RATE_LIMIT_SECOND_LIMIT |
static String |
HEADER_RATE_LIMIT_SECOND_REMAINING |
| Constructor and Description |
|---|
CMAHttpException(okhttp3.Request request,
okhttp3.Response response)
Construct an error response.
|
| Modifier and Type | Method and Description |
|---|---|
int |
rateLimitHourLimit() |
int |
rateLimitHourRemaining() |
int |
rateLimitReset() |
int |
rateLimitSecondLimit() |
int |
rateLimitSecondRemaining() |
int |
responseCode() |
String |
responseMessage() |
String |
toString()
Convert exception to human readable form.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic static final String HEADER_RATE_LIMIT_HOUR_LIMIT
public static final String HEADER_RATE_LIMIT_HOUR_REMAINING
public static final String HEADER_RATE_LIMIT_SECOND_LIMIT
public static final String HEADER_RATE_LIMIT_SECOND_REMAINING
public static final String HEADER_RATE_LIMIT_RESET
public CMAHttpException(okhttp3.Request request,
okhttp3.Response response)
This constructor will fill the exception with easy accessible values, like
responseCode(). responseMessage(), but also
rateLimitReset().
request - the request issuing the error.response - the response from the server to this faulty request.public String toString()
public int responseCode()
public String responseMessage()
public int rateLimitHourLimit()
public int rateLimitHourRemaining()
public int rateLimitSecondLimit()
public int rateLimitSecondRemaining()
public int rateLimitReset()
Copyright © 2017 Contentful, GmbH.. All Rights Reserved.