isConsoleSdkError
isConsoleSdkError(
e):e is ConsoleSdkError
Defined in: console-sdk/src/errors/guards.ts:23
Narrows any caught value to the SDK’s error hierarchy. Everything the SDK
rejects or reports is a ConsoleSdkError; anything else escaping is a bug.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”e is ConsoleSdkError
Example
Section titled “Example”try { await connectAsync(id); } catch (e) { if (isConsoleSdkError(e)) console.warn(e.code);}