public class CMAHttpException
extends java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
CMAHttpException.ErrorBody |
getErrorBody() |
int |
rateLimitHourLimit() |
int |
rateLimitHourRemaining() |
int |
rateLimitReset() |
int |
rateLimitSecondLimit() |
int |
rateLimitSecondRemaining() |
int |
responseCode() |
java.lang.String |
responseMessage() |
java.lang.String |
toString()
Convert exception to human readable form.
|
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 java.lang.String toString()
toString
in class java.lang.Throwable
public int responseCode()
public java.lang.String responseMessage()
public int rateLimitHourLimit()
public int rateLimitHourRemaining()
public int rateLimitSecondLimit()
public int rateLimitSecondRemaining()
public int rateLimitReset()
public CMAHttpException.ErrorBody getErrorBody()
Copyright © 2019 Contentful, GmbH.. All Rights Reserved.