ITwinError.isError Function
Determine whether an error object was thrown by iTwin.js and has a specific scope and key.
If the test succeeds, the type of error
is coerced to T
isError<T extends ITwinError>(error: unknown, scope: string, key?: string): error is T
Parameter | Type | Description |
---|---|---|
error | unknown | The error to ve verified. |
scope | string | value for error.iTwinErrorId.scope |
key | string | value for error.iTwinErrorId.key |
Returns - error is T
Defined in
- core/bentley/src/BentleyError.ts Line 66
Last Updated: 23 April, 2025
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.