AIError
IntroductionThis class encapsulates the error information generated by the SDK. An AIError object includes the error code and a meaningful error message. Constants
kAIAccessDeniedThe resource owner or authorization server denied the request. extern const NSUInteger kAIAccessDenied; DiscussionThe user declined to authorize the application on the consent page. In general on getting this type of error, the application can call authorizeUserForScopes:delegate: to request authorization. The following APIs return this error: 1. authorizeUserForScopes:delegate:
kAIApplicationNotAuthorizedA valid refresh token was not found. extern const NSUInteger kAIApplicationNotAuthorized; DiscussionThe refresh token held by the SDK is invalid, expired, revoked, does not match the redirection URI used in the authorization request, does not have the required scopes, or was issued to another client. In general with this type of error, the application can call authorizeUserForScopes:delegate: to request authorization, or call clearAuthorizationState: to logout the user. The following APIs return this error:
kAIDeviceErrorThe SDK encountered an error on the device. extern const NSUInteger kAIDeviceError; DiscussionCurrently, the SDK only throws this error when it receives the some error from the keychain service. In general on getting this type of error, the application can call clearAuthorizationState: to reset the KeyChain. The following APIs return this error:
kAIErrorUserInterruptedThe user canceled the login page. extern const NSUInteger kAIErrorUserInterrupted; DiscussionThe user pressed cancel while on the login or the consent page. In general on getting this type of error, the application can allow user to login again. The following APIs return this error: 1. authorizeUserForScopes:delegate:
kAIInternalErrorAn internal error occured in the SDK. extern const NSUInteger kAIInternalError; DiscussionIn general, these errors cannot be handled by application. Please contact us to report recurring internal errors. The following APIs return this error: kAIInvalidInputOne of the API parameters is invalid. extern const NSUInteger kAIInvalidInput; DiscussionThe request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check your method parameters and try again. This error is expected from all APIs.
kAINetworkErrorA network error occurred, possibly due to the user being offline. extern const NSUInteger kAINetworkError; DiscussionIn general on getting this error the application can ask the user to check their network connections. The following APIs return this error:
kAINoErrorNo error code. extern const NSUInteger kAINoError; DiscussionInitial value to which the error object is initialized.
kAIServerErrorAn error occured on the server. extern const NSUInteger kAIServerError; DiscussionThe server encountered an error while completing the request, or the SDK received an unknown response from the server. In general on getting this type of error, the application can allow user to retry the last action. The following APIs return this error:
kAIUnauthorizedClientThe client is not authorized to request an authorization code using this method. extern const NSUInteger kAIUnauthorizedClient; DiscussionThe application is not authorized to make this call. Make sure the registered Bundle identifier matches your application, and that you have a valid APIKey property in the application property list. The following APIs return this error:
Properties
codeThe error code for the error encountered by the API. @property NSUInteger code;
messageThe readable message corresponding to the error code. @property (retain) NSString* message; DiscussionThe message provides more information about the exact type of error encountered by the API.
|