Package io.ably.lib.types
Class ErrorInfo
java.lang.Object
io.ably.lib.types.ErrorInfo
A generic Ably error object that contains an Ably-specific status code, and a generic status code.
 Errors returned from the Ably server are compatible with the ErrorInfo structure and should result in errors that inherit from ErrorInfo.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionintAbly error code.This is included for REST responses to provide a URL for additional help on the error code.Additional message information, where available.intHTTP Status Code corresponding to this error, where applicable. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ErrorInfofromMsgpackBody(byte[] msgpack) static ErrorInfofromResponseStatus(String statusLine, int statusCode) static ErrorInfofromThrowable(Throwable throwable) toString() 
- 
Field Details
- 
code
public int codeAbly error code.Spec: TI1
 - 
statusCode
public int statusCodeHTTP Status Code corresponding to this error, where applicable.Spec: TI1
 - 
message
Additional message information, where available.Spec: TI1
 - 
href
This is included for REST responses to provide a URL for additional help on the error code.Spec: TI4
 
 - 
 - 
Constructor Details
- 
ErrorInfo
public ErrorInfo()Public no-argument constructor for msgpack - 
ErrorInfo
Construct an ErrorInfo from message and code- Parameters:
 - 
message- Additional message information, where available. - 
code- Ably error code. 
 - 
ErrorInfo
Construct an ErrorInfo from message, statusCode, and code- Parameters:
 - 
message- Additional message information, where available. - 
statusCode- HTTP Status Code corresponding to this error, where applicable. - 
code- Ably error code. 
 
 - 
 - 
Method Details
- 
toString
 - 
fromMsgpackBody
- Throws:
 IOException
 - 
fromThrowable
 - 
fromResponseStatus
 - 
equals
 
 -