Article

Error Codes

Possible errors thrown by the customer's device.

Overview

The device may return various errors as listed in the following tables. All errors in the tables are from the com.apple.icloud.messages.business domain.

Table 1

Authentication domain errors

Error

Code

Message

Description

BCTokenMissingError

1

Missing Token or Missing Code.

Thrown when the authentication plugin cannot retrieve a token or a code from the redirect URL.

BCEmptyDataReceivedError

2

Empty data received when exchanging token.

Thrown when the authentication plugin receives an empty response when exchanging the code for a token.

BCAccessTokenMissingFromResponseError

3

Missing access token from response.

Thrown when the authentication plugin receives a valid response, but the response is missing access_token from the JSON body.

Table 2

Cryptor domain errors

Error

Code

Message

Description

BCPublicKeyIsEmptyError

1

Empty string received for key.

Thrown when the cryptor is given an empty public key.

BCPublicKeyIsNotUTF8Error

2

Key is not UTF-8.

Thrown when the cryptor Base64-decodes the public key and fails because the encoding is not UTF-8.

BCPublicKeyIsInvalidError

3

Public key is invalid.

Thrown when the cryptor fails to validate the key against SecKeyAlgorith.eciesEnCryptionCofactorVariableVX963SHA256AESGCM.

BCPublicKeyInternalError

3

Failed adding key.

Failed reading key.

Failed deleting key.

Thrown when the cryptor cannot complete the given task due to an internal error.

BCEncryptionError

4

Unable to encrypt token.

Thrown when the cryptor fails to encrypt a given payload using the provided public key.

See Also

Authenticate Responses

object AuthenticateResponse

Keys used in the JSON dictionary which is the response body.

object AuthenticateResponseErrorCodes

The keys for the Error Response dictionary used in sending an authentication message.