DBRequestRateLimitError
Objective-C
@interface DBRequestRateLimitError : DBRequestHttpError
Swift
class DBRequestRateLimitError : DBRequestHttpError
Rate limit request error.
Contains relevant information regarding a failed network request. Initialized in the event of an HTTP 429 response. Extends DBRequestHttpError.
-
The structured object returned by the Dropbox API in the event of a 429 rate-limit error.
Declaration
Objective-C
@property (nonatomic, readonly) DBAUTHRateLimitError *_Nonnull structuredRateLimitError;Swift
var structuredRateLimitError: DBAUTHRateLimitError { get } -
The number of seconds to wait before making any additional requests in the event of a rate-limit error.
Declaration
Objective-C
@property (nonatomic, readonly) NSNumber *_Nonnull backoff;Swift
var backoff: NSNumber { get } -
DBRequestRateLimitError full constructor.
Declaration
Objective-C
- (nonnull instancetype)init:(nonnull NSString *)requestId statusCode:(nonnull NSNumber *)statusCode errorContent:(nonnull NSString *)errorContent userMessage:(nullable DBLocalizedUserMessage *)userMessage structuredRateLimitError: (nonnull DBAUTHRateLimitError *)structuredRateLimitError backoff:(nonnull NSNumber *)backoff;Swift
init(_ requestId: String, statusCode: NSNumber, errorContent: String, userMessage: DBLocalizedUserMessage?, structuredRateLimitError: DBAUTHRateLimitError, backoff: NSNumber)Parameters
requestIdThe Dropbox request id of the network call. This is useful to Dropbox for debugging issues with Dropbox’s SDKs and API.
statusCodeThe HTTP response status code of the request.
errorContentA string representation of the error body received in the reponse. If for a route-specific error, this field will be the value of the “error_summary” key.
userMessageAn error message object that is optionally returned from some API endpoints.
structuredRateLimitErrorThe structured object returned by the Dropbox API in the event of a 429 rate-limit error.
backoffThe number of seconds to wait before making any additional requests in the event of a rate-limit error.
Return Value
An initialized DBRequestRateLimitError instance.
-
Description method.
Declaration
Objective-C
- (nonnull NSString *)description;Swift
func description() -> StringReturn Value
A human-readable representation of the current DBRequestRateLimitError object.
View on GitHub
DBRequestRateLimitError Class Reference