SDKError.code
Machine-readable error code — one of the twenty
ErrorCode values listed under Errors. Switch on it, with ErrorCode.X or the string.propertyPropertiessince 1.0.0
Signature
readonly code: ErrorCodeValue
Returns
ErrorCodeValue
Example
TypeScript
if (err instanceof SDKError && err.code === 'PASSWORD_ERROR') { askForPassword(); }