MobileLockerError
Defined in: errors.ts:78
Base error class thrown by SDK methods.
Domain-specific errors extend this class so instanceof MobileLockerError matches all of them.
Example
Section titled “Example”try { await mobilelocker.user.get()} catch (err) { if (err instanceof MobileLockerError && err.code === GeneralErrorCode.NotConnected) { showOfflineBanner() }}Extends
Section titled “Extends”Error
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MobileLockerError(message, code?): MobileLockerError;Defined in: errors.ts:82
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
message |
string |
undefined |
code |
string |
GeneralErrorCode.ServerError |
Returns
Section titled “Returns”MobileLockerError
Overrides
Section titled “Overrides”Error.constructorProperties
Section titled “Properties”readonly code: string;Defined in: errors.ts:80
Machine-readable error code. Prefer the *ErrorCode constants for comparisons.