Package com.vonage.client
Class VonageApiResponseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.vonage.client.VonageClientException
com.vonage.client.VonageApiResponseException
- All Implemented Interfaces:
Jsonable,Serializable
- Direct Known Subclasses:
AccountResponseException,ApplicationResponseException,CamaraResponseException,ConversationsResponseException,MeetingsResponseException,MessageResponseException,NetworkAuthResponseException,NumberInsight2ResponseException,NumbersResponseException,ProactiveConnectResponseException,RedactResponseException,SubaccountsResponseException,UsersResponseException,VerifyResponseException,VideoResponseException,VoiceResponseException
Base class for exceptions which represent an error API response conforming to
RFC 7807 standard.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedVonageApiResponseException(String message) protectedVonageApiResponseException(String message, Throwable cause) protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected static <E extends VonageApiResponseException>
EgetCode()Name of the error code.Extended description of the error, explaining the cause.The status code description.List<?> Additional description of problems encountered with the request.Internal trace ID of the request.List<?> If the request was rejected due to invalid parameters, this will return the offending parameters, sometimes along with a description of the errors.intThe API response status code, usually 4xx or 500.getTitle()Brief description / name of the error.getType()Link to the API error type.inthashCode()toJson()Generates JSON from this object.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.vonage.client.Jsonable
updateFromJson
-
Field Details
-
type
-
title
-
detail
-
instance
-
code
-
errorCodeLabel
-
errorCode
-
errors
-
invalidParameters
-
statusCode
-
-
Constructor Details
-
VonageApiResponseException
protected VonageApiResponseException() -
VonageApiResponseException
-
VonageApiResponseException
-
VonageApiResponseException
-
-
Method Details
-
getErrorCodeLabel
The status code description.- Returns:
- The error code label, or
nullif unknown.
-
getType
Link to the API error type.- Returns:
- URL of the error type / description.
-
getTitle
Brief description / name of the error.- Returns:
- The error title.
-
getDetail
Extended description of the error, explaining the cause.- Returns:
- The detailed error description.
-
getInstance
Internal trace ID of the request.- Returns:
- The instance ID.
-
getErrors
Additional description of problems encountered with the request. This is typically only applicable to 400 or 409 error codes.- Returns:
- The list of errors returned from the server (could be a Map or String),
or
nullif none / not applicable.
-
getInvalidParameters
If the request was rejected due to invalid parameters, this will return the offending parameters, sometimes along with a description of the errors.- Returns:
- The list of invalid parameters, typically as a Map, or
nullif not applicable. - Since:
- 7.7.0
-
getCode
Name of the error code.- Returns:
- The Vonage error code as a string, or
nullif unknown / not applicable.
-
getStatusCode
The API response status code, usually 4xx or 500.- Returns:
- The status code.
-
getMessage
- Overrides:
getMessagein classThrowable
-
equals
-
hashCode
-
toJson
Generates JSON from this object. Excludes fields inherited from superclasses. -
fromJson
-