public class CMAHttpException extends RuntimeException
| 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 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.