public class CMAHttpException extends RuntimeException
| Modifier and Type | Class and Description |
|---|---|
static class |
CMAHttpException.ErrorBody
Error body potentially delivered with an error request.
|
| Constructor and Description |
|---|
CMAHttpException(okhttp3.Request request,
okhttp3.Response response)
Construct an error response.
|
CMAHttpException(okhttp3.Request request,
okhttp3.Response response,
boolean logSensitiveData) |
| Modifier and Type | Method and Description |
|---|---|
CMAHttpException.ErrorBody |
getErrorBody() |
int |
rateLimitHourLimit() |
int |
rateLimitHourRemaining() |
int |
rateLimitReset() |
int |
rateLimitSecondLimit() |
int |
rateLimitSecondRemaining() |
int |
responseCode() |
String |
responseMessage() |
boolean |
shouldLogSensitiveData() |
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 CMAHttpException(okhttp3.Request request,
okhttp3.Response response,
boolean logSensitiveData)
public String toString()
public boolean shouldLogSensitiveData()
public int responseCode()
public String responseMessage()
public int rateLimitHourLimit()
public int rateLimitHourRemaining()
public int rateLimitSecondLimit()
public int rateLimitSecondRemaining()
public int rateLimitReset()
public CMAHttpException.ErrorBody getErrorBody()
Copyright © 2026 Contentful, GmbH.. All rights reserved.