public class NexmoApiError
extends java.lang.Object
Nexmo API exception that can be caught and handled.
Modifier | Constructor and Description |
---|---|
protected |
NexmoApiError(java.lang.String type,
java.lang.String message,
java.lang.String tid,
java.lang.String conversationId) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static NexmoApiError |
fromCoreError(CoreConversationApiError error)
Converts
CoreConversationApiError to NexmoApiError |
java.lang.String |
getConversationId()
Optional conversation id associated with the request.
|
java.lang.String |
getMessage()
Human readable description of the exception.
|
java.lang.String |
getTid()
Optional request id for which the error occurred, null if the request was pre-validated client side.
|
java.lang.String |
getType()
The error type as received from backend, for example "text:error-not-joined"
|
int |
hashCode() |
static NexmoApiError |
missingParams(java.lang.String message)
Produces
NexmoApiError |
protected NexmoApiError(java.lang.String type, java.lang.String message, java.lang.String tid, java.lang.String conversationId)
public static NexmoApiError fromCoreError(CoreConversationApiError error)
CoreConversationApiError
to NexmoApiError
error
- error to be converted.public static NexmoApiError missingParams(java.lang.String message)
NexmoApiError
message
- Error message.public java.lang.String getTid()
public java.lang.String getConversationId()
public java.lang.String getType()
public java.lang.String getMessage()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object