ARTErrorInfo

Objective-C

@interface ARTErrorInfo : NSError

Swift

class ARTErrorInfo : NSError

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 ARTErrorInfo structure and should result in errors that inherit from ARTErrorInfo.

See

For possible NSError.code see Ably error codes.
  • Additional message information, where available.

    Declaration

    Objective-C

    @property (readonly) NSString *_Nonnull message;

    Swift

    var message: String { get }
  • The reason why the error occured, where available.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *reason;

    Swift

    var reason: String? { get }
  • HTTP Status Code corresponding to this error, where applicable.

    Declaration

    Objective-C

    @property (readonly) NSInteger statusCode;

    Swift

    var statusCode: Int { get }
  • This is included for REST responses to provide a URL for additional help on the error code.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *href;

    Swift

    var href: String? { get }
  • If a request fails, the request ID must be included in the ARTErrorInfo returned to the user.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *requestId;

    Swift

    var requestId: String? { get }
  • Information pertaining to what caused the error where available.

    Declaration

    Objective-C

    @property (readonly, nullable) ARTErrorInfo *cause;

    Swift

    var cause: ARTErrorInfo? { get }