SDKError

The SDKError class represents an extended JavaScript Error class that is returned upon failure by all IronWeb 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

PropertyValueDescription
messagestringReadable error message.
codenumberNumerical error code that represents a unique Error Code for the operation that failed.
rawErrorErrorOriginal, unaltered JavaScript Error instance that this custom Error class wrapped.

Example

import {ErrorCodes, document} from '@ironcorelabs/ironweb';

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

Products

Documentation

Trust Center

Find Us