DBAUTHRateLimitError

Objective-C

@interface DBAUTHRateLimitError : NSObject <DBSerializable, NSCopying>

Swift

class DBAUTHRateLimitError : NSObject, DBSerializable, NSCopying

The RateLimitError struct.

Error occurred because the app is being rate limited.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

  • The reason why the app is being rate limited.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBAUTHRateLimitReason *_Nonnull reason;

    Swift

    var reason: DBAUTHRateLimitReason { get }
  • The number of seconds that the app should wait before making another request.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull retryAfter;

    Swift

    var retryAfter: NSNumber { get }

Constructors

  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithReason:(nonnull DBAUTHRateLimitReason *)reason
                                retryAfter:(nullable NSNumber *)retryAfter;

    Swift

    init(reason: DBAUTHRateLimitReason, retryAfter: NSNumber?)

    Parameters

    reason

    The reason why the app is being rate limited.

    retryAfter

    The number of seconds that the app should wait before making another request.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithReason:(nonnull DBAUTHRateLimitReason *)reason;

    Swift

    init(reason: DBAUTHRateLimitReason)

    Parameters

    reason

    The reason why the app is being rate limited.

    Return Value

    An initialized instance.