VKError Class Reference

Inherits from VKObject : NSObject
Declared in VKError.h
VKError.m

Overview

Class for presenting VK SDK and VK API errors

  httpError

Contains system HTTP error

@property (nonatomic, strong) NSError *httpError

Discussion

Contains system HTTP error

Declared In

VKError.h

  apiError

Describes API error

@property (nonatomic, strong) VKError *apiError

Discussion

Describes API error

Declared In

VKError.h

  request

Request which caused error

@property (nonatomic, strong) VKRequest *request

Discussion

Request which caused error

Declared In

VKError.h

  errorCode

May contains such errors:\n HTTP status code if HTTP error occured;\n VK_API_ERROR if API error occured;\n VK_API_CANCELED if request was canceled;\n VK_API_REQUEST_NOT_PREPARED if error occured while preparing request;

@property (nonatomic, assign) NSInteger errorCode

Discussion

May contains such errors:\n HTTP status code if HTTP error occured;\n VK_API_ERROR if API error occured;\n VK_API_CANCELED if request was canceled;\n VK_API_REQUEST_NOT_PREPARED if error occured while preparing request;

Declared In

VKError.h

  errorMessage

API error message

@property (nonatomic, strong) NSString *errorMessage

Discussion

API error message

Declared In

VKError.h

  errorReason

Reason for authorization fail

@property (nonatomic, strong) NSString *errorReason

Discussion

Reason for authorization fail

Declared In

VKError.h

  requestParams

API parameters passed to request

@property (nonatomic, strong) NSDictionary *requestParams

Discussion

API parameters passed to request

Declared In

VKError.h

  captchaSid

Captcha identifier for captcha-check

@property (nonatomic, strong) NSString *captchaSid

Discussion

Captcha identifier for captcha-check

Declared In

VKError.h

  captchaImg

Image for captcha-check

@property (nonatomic, strong) NSString *captchaImg

Discussion

Image for captcha-check

Declared In

VKError.h

  redirectUri

Redirection address if validation check required

@property (nonatomic, strong) NSString *redirectUri

Discussion

Redirection address if validation check required

Declared In

VKError.h

+ errorWithCode:

Generate new error with code

+ (instancetype)errorWithCode:(NSInteger)errorCode

Parameters

errorCode

positive if it’s an HTTP error. Negative if it’s API or SDK error

Discussion

Generate new error with code

Declared In

VKError.h

+ errorWithJson:

Generate API error from JSON

+ (instancetype)errorWithJson:(id)JSON

Parameters

JSON

Json description of VK API error

Discussion

Generate API error from JSON

Declared In

VKError.h

+ errorWithQuery:

Generate API error from HTTP-query

+ (instancetype)errorWithQuery:(NSDictionary *)queryParams

Parameters

queryParams

key-value parameters

Discussion

Generate API error from HTTP-query

Declared In

VKError.h

– answerCaptcha:

Repeats failed captcha request with user entered answer to captcha

- (void)answerCaptcha:(NSString *)userEnteredCode

Parameters

userEnteredCode

answer for captcha

Discussion

Repeats failed captcha request with user entered answer to captcha

Declared In

VKError.h