1. Docs
  2. Data Control Platform
  3. SDKs
  4. NodeJS
  5. SDKError
  1. Docs
  2. Data Control Platform
  3. SDKs
  4. NodeJS
  5. SDKError

SDKError

The SDKError class represents an extended JavaScript Error class that is returned upon failure for all IronNode SDKs that return Promises. This custom error class has the same properties as the normal JavaScript Error class but also exposes a code property that represents one of the unique Error Codes that can occur.

Properties

Property Value Description
message string Readable error message.
code number Numerical error code that represents a unique Error Code for the operation that failed.
rawError Error Original, unaltered JavaScript Error instance that this custom Error class wrapped.

Example

JavaScript
SDK.document.decryptFromStore('323') .then(() => {}) .catch((error) => { //The 'error' variable is an instance of an SDKError if(error.code === IronNode.ErrorCodes.DOCUMENT_DECRYPT_FAILURE){...} })