DBRequestHttpError

@interface DBRequestHttpError : NSObject

Http request error.

Contains relevant information regarding a failed network request. All error types except for DBClientError extend this class as children. Initialized in the event of a generic, unidentified HTTP error.

  • The Dropbox request id of the network call. This is useful to Dropbox for debugging issues with Dropbox’s SDKs and API. Please include the value of this field when submitting technical support inquiries to Dropbox.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull requestId;

    Swift

    var requestId: String { get }
  • The HTTP response status code of the request.

    Declaration

    Objective-C

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

    Swift

    var statusCode: NSNumber { get }
  • A 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.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull errorContent;

    Swift

    var errorContent: String { get }
  • A human-readable error message that is optionally returned from some API endpoints.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) NSString *userMessage;

    Swift

    var userMessage: String? { get }
  • DBRequestHttpError full constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)init:(nonnull NSString *)requestId
                      statusCode:(nonnull NSNumber *)statusCode
                    errorContent:(nonnull NSString *)errorContent
                     userMessage:(nullable NSString *)userMessage;

    Swift

    init(_ requestId: String, statusCode: NSNumber, errorContent: String, userMessage: String?)

    Parameters

    requestId

    The Dropbox request id of the network call. This is useful to Dropbox for debugging issues with Dropbox’s SDKs and API.

    statusCode

    The HTTP response status code of the request.

    errorContent

    A 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.

    userMessage

    A human-readable error message that is optionally returned from some API endpoints.

    Return Value

    An initialized DBRequestHttpError instance.

  • Description method.

    Declaration

    Objective-C

    - (nonnull NSString *)description;

    Swift

    func description() -> String

    Return Value

    A human-readable representation of the current DBRequestHttpError object.