iOS SDK status and error codes
When using the Native iOS SDK, your application should handle errors thrown by the eSignature REST API or errors that the SDK itself generates. To do so, you need to use the error object in your application and provider code to address specific errors.
How to detect iOS SDK errors
There are two ways you can use Swift language with the Native iOS SDK to handle errors.
Option 1: Use error.code to check for the different values to determine which error occurred. For example:
Option 2: The same as above, but use the error.domain property to check which error occurred:
Error messages
The following errors may be returned when making eSignature REST API calls via the Native iOS SDK:
DSM_USER_ADDITIONAL_DATA_FETCH_ERROR
Unable to fetch additional data for the specified user.
DSM_USER_LOGIN_ERROR
Invalid login information (user name or password) for the given user.
DSM_USER_PERSIST_ERROR
Account information cannot be persisted for the user that logged in.
DSM_USER_DATA_FETCH_ERROR
Account information cannot be retrieved for the user that logged in.
DSM_USER_DATA_DELETE_ERROR
Unable to delete account information for the given user.
DSM_USER_NOT_LOGGED_IN_ERROR
Unable to authenticate because no user is logged in.
DSM_SDK_SETUP_ERROR
Setup of the iOS SDK failed. Please reinstall the SDK.
DSM_SDK_FETCH_ERROR
Invalid or incorrectly formatted method parameters. The error object will include the specific details of the wrong method call.
DSM_TEMPLATE_IMPORT_ERROR
Failed to import the Docusign eSignature template for use with the iOS SDK.
DSM_TEMPLATE_SAVE_ERROR
The template cannot be saved for one of the following reasons:
- Template does not include any documents.
- Template does not include any recipients.
- Template has FreeForm signers (signers without any tabs).
- Template has unsupported tab types.
- Template has unsupported recipient attributes.
- Template has unsupported tab attributes.
- Template uses digital signature (iOS SDK does not support digital signature).
- Template has an In Person Signer missing the role name.
- In Person signers in templates only allow placeholder (role) recipients.
- Role name is missing for one of the recipients in the template.
- Require Recipients to Draw Each Signature feature is not supported in iOS SDK templates.
- Signing Group is not currently supported in the iOS SDK templates.
- Template contains conflicting role names.
- Template includes unsupported supplemental document(s).
- Template requires List Custom field(s) which are not allowed in the iOS SDK.
DSM_TEMPLATE_SEND_ERROR
The template cannot be sent for one of the following reasons:
- Template was not saved and is not currently in the Docusign iOS app cache.
- Template contains duplicate recipients.
- Offline signing is not currently available.
- Template has duplicate offline signers.
- Template Signer name is invalid.
- Template In Person Signer name is invalid.
- Template Signer email address is invalid.
- Invalid RecipientId found in the template.
DSM_TEMPLATE_SIGN_ERROR
The template cannot be signed for one of the following reasons:
- The template has a FreeForm signer (a signer without any preconfigured tabs).
- The template contained a required text custom field and the value for that field was not specified.
- The template includes a formula with value(s) that are not currently supported.
- Template includes an invalid formula tab.
DSM_TEMPLATE_ENVELOPE_DEFAULTS_ERROR
This error indicates that there’s a conflict between the default template settings in the configuration of the iOS SDK and a specified template. It can occur because of one of the following reasons:
- Invalid recipient associated with a specific role name.
- A specific recipient cannot be removed from the template.
- Invalid default value for a specific tab in the envelope.
DSM_DOCUMENT_INVALID_TYPE_ERROR
This error indicates that an invalid file type was used to create a document for later use with the iOS SDK. See the list of supported file formats.
DSM_DOCUMENT_EXCEEDS_LIMIT_ERROR
The document was over 25 MB in size. The eSignature REST API is limited to 25 MB for any document type.
DSM_DOCUMENT_GENERIC_ERROR
Error selecting a document for reasons unknown. You may want to ask the end user to try again.
DSM_ENVELOPE_SAVE_ERROR
This error can mean one of two different things:
- No internet connection when trying to use online signing. You may be able to still use offline signing.
- Cannot save envelope to local device because of issues with the mobile device (lack of storage or no permission).
DSM_ENVELOPE_RESUME_ERROR
Offline envelope is ready to be resumed for online signing, but this cannot be continued because of some problem. The error message will include a report of the root cause separately.
DSM_ENVELOPE_COREDATA_PERSISTENCE_FAILED_REASON
This error indicates that the envelope cannot be saved to the local device because of issues with the mobile device.
DSM_ENVELOPE_CREATION_ONLINEMODE_UNSUPPORTED
This error occurs because of a lack of internet connection preventing use of online mode. You may want to use offline signing when this happens.
DSM_ENVELOPE_WITH_INVALID_TEXT_TAB_DEFAULTS_REASON
The envelope contains tabs with invalid default values.
DSM_ENVELOPE_RESUME_FAILED_REASON
This error is the same as DSM_ENVELOPE_RESUME_ERROR but includes additional information about the root cause.
DSM_ENVELOPE_CAPTIVE_RECIPIENTS_ERROR
This error can occur for two reasons:
- Envelope includes invalid embedded signers. The error will provide the
clientUserIdfor the invalid embedded signers. - There’s an invalid embedded URL in the envelope.
DSM_ENVELOPE_IMPORT_ERROR
Envelope import failed.