Skip to main content
@moss-js/moss / isMossError

Function: isMossError()

isMossError(error): error is MossError
True when error is an Error whose code is one of the MossErrorCode values. Every failure from the native core passes, and so does an argument the SDK rejects with a code, such as queryMultiIndex([]). A plain Error the SDK throws without a code, such as MossClient is closed, does not, and neither does a ManageApiError from the web source methods. (@moss-js/moss 1.16.0+)

Parameters

Returns

error is MossError

Example