- Docs
- Data Control Platform
- SDKs
- NodeJS
- Error Codes
Error Codes
Various errors can occur during calls to the IronNode SDK. The SDK exposes error codes that help developers decision off of errors in order to handle them as appropriate for their application. The error codes will be attached to the SDKError instance that is exposed in the catch
handler for returned Promises.
Each error that can occur within the SDK will also have a message
which can help developers determine what happened as part of the failure. The error code is a way to classify errors to determine which part of an operation failed.
Example
JavaScriptconst IronNode = require("@ironcorelabs/ironnode"); IronNode.initialize(...) .then(() => {...}) .catch((error) => { if (error.code === IronNode.ErrorCodes.USER_PASSCODE_INCORRECT) { alert("User private key password was incorrect!"); } });
The list of different error codes that can be raised as part of SDK use are enumerated in the source code.