> For the complete documentation index, see [llms.txt](https://docs.1kosmos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1kosmos.com/mobile-sdk/native/ios/api-reference/error-manager/customerrors.md).

# CustomErrors

**public struct** CustomErrors

***

Utility to manage various error codes and messages.

### Error Codes

The table below lists all error codes and messages provided by BlockID SDK.

| Key                               | Code   | Message                                                                                |
| --------------------------------- | ------ | -------------------------------------------------------------------------------------- |
| kWalletCreationFailed             | 1004   | Wallet creation failed                                                                 |
| kUserIdAlreadyExists              | 1005   | UserId already exists.                                                                 |
| kSomethingWentWrong               | 1007   | Something went wrong!\nPlease try again!                                               |
| kSomeProblemWhileFaceFinding      | 1008   | Camera sensor is blocked.                                                              |
| kUnauthorizedAccess               | 1111   | Unauthorized access.                                                                   |
| kPublicKeyRequired                | 1200   | Public key required.                                                                   |
| kEncryption                       | 1201   | Something went wrong with encrypting information.                                      |
| kDecryption                       | 1202   | Something went wrong with decrypting information.                                      |
| kDocumentDataMandatory            | 412000 | Document data is mandatory.                                                            |
| kInvalidPP                        | 412002 | Invalid Passport.                                                                      |
| kDocumentVerificationFailed       | 412004 | Scanned document verification failed.                                                  |
| kFaceLivenessCheckFailed          | 412006 | LiveID Liveness check failed.                                                          |
| KLiveIdTokenValidationFailed      | 412007 | LiveID token validation failed.                                                        |
| kLiveIDMismatch                   | 401    | LiveID did not match.                                                                  |
| kDocumentDataMismatch             | 410    | The document data doesn't match with already enrolled document.                        |
| kDocumentPhotoComparisonFailed    | 411    | Your photo on the document does not match with LiveID enrolled on this device.         |
| kDocumentExpired                  | 415    | The document you are trying to enroll is already expired.                              |
| kDocumentEnrolled                 | 416    | Document is already enrolled                                                           |
| kDocumentPhotoNotFound            | 417    | Document photo not found.                                                              |
| kLiveIDMandatory                  | 421    | LiveID is mandatory.                                                                   |
| K\_Id\_Is\_Mandatory              | 422    | Document ID is mandatory.                                                              |
| K\_Type\_Is\_Mandatory            | 423    | Document type is mandatory.                                                            |
| K\_Category\_Is\_Mandatory        | 424    | Document category is mandatory.                                                        |
| K\_ProofedBy\_Is\_Mandatory       | 425    | Document proofed by is mandatory.                                                      |
| K\_LiveId\_Not\_Unenrolled        | 426    | LiveID can't be un-enrolled.                                                           |
| K\_Invalid\_Category              | 427    | Document category is invalid.                                                          |
| K\_Document\_Not\_Exist           | 428    | Document does not exist.                                                               |
| K\_FirstName\_Is\_Mandatory       | 429    | Document first name is mandatory.                                                      |
| K\_LastName\_Is\_Mandatory        | 430    | Document last name is mandatory.                                                       |
| K\_DateOfBirth\_Is\_Mandatory     | 431    | Document date of birth is mandatory.                                                   |
| K\_DateOfExpiry\_Is\_Mandatory    | 432    | Document date of expiry is mandatory.                                                  |
| K\_Face\_Is\_Mandatory            | 433    | Document face is mandatory.                                                            |
| K\_Image\_Is\_Mandatory           | 434    | Document image is mandatory.                                                           |
| K\_LiveId\_Enrolled               | 435    | LiveID is already enrolled.                                                            |
| K\_LiveId\_Wrong\_Enrollment      | 436    | LiveID can only be enrolled using setLiveID and registerDocument(with LiveID) methods. |
| K\_SSN\_Mandatory                 | 438    | SSN is mandatory.                                                                      |
| K\_REGISTRATION\_NOT\_ALLOWED     | 439    | Registration is not allowed during restoration.                                        |
| kNotTrustedSessionSource          | 420    | Session Url is not a trusted session source.                                           |
| kResetSDK                         | 120    | Reset SDK                                                                              |
| kPPAboutToExpire                  | 100001 | This document is about to expire.                                                      |
| kPPExpired                        | 100002 | Expired passport.                                                                      |
| kInvalidPPBioData                 | 100004 | Passport Bio-Data not scanned properly.                                                |
| kInvalidPPEChipData               | 100005 | Invalid E-Passport Chip Data.                                                          |
| kPPRFIDTimeout                    | 100009 | E-Passport Chip scan timeout.                                                          |
| kPPRFIDUserCancelled              | 100011 | E-Passport Chip scan was cancelled by user                                             |
| kTenantRegisterFailed             | 1001   | Tenant registration fail.                                                              |
| K\_TENANT\_DNS\_IS\_MANDATORY     | 413003 | Tenant DNS is mandatory.                                                               |
| K\_COMMUNITY\_NAME\_IS\_MANDATORY | 413004 | Community name is mandatory.                                                           |
| K\_TENANT\_MANDATORY              | 413005 | BIDTenant is mandatory                                                                 |
| kSessionExpired                   | 413006 | Session has expired.                                                                   |
| K\_KEY\_PATH\_IS\_MANDATORY       | 413007 | Key Path is mandatory                                                                  |
| K\_USER\_IS\_DISABLED             | 414001 | User account is disabled.                                                              |
| K\_USER\_IS\_LOCKED               | 414002 | User account is locked.                                                                |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.1kosmos.com/mobile-sdk/native/ios/api-reference/error-manager/customerrors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
