isError MethodStatic @beta
Determine if an error object implements the LegacyITwinErrorWithNumber interface.
If the test succeeds, the type of error is coerced to T
isError<T extends LegacyITwinErrorWithNumber>(error: unknown, errorNumber?: number): error is T
@note this method does not test that the object is an instanceOf BentleyError.
| Parameter | Type | Description |
|---|---|---|
| error | unknown | |
| errorNumber | number |
Returns - error is T
Defined in
- core/bentley/src/BentleyError.ts Line 437
Last Updated: 17 September, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.