We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ee825b commit eed54b3Copy full SHA for eed54b3
packages/angular_devkit/build_angular/src/utils/error.ts
@@ -9,5 +9,9 @@
9
import assert from 'assert';
10
11
export function assertIsError(value: unknown): asserts value is Error & { code?: string } {
12
- assert(value instanceof Error, 'catch clause variable is not an Error instance');
+ const isError =
13
+ value instanceof Error ||
14
+ // The following is needing to identify errors coming from RxJs.
15
+ (typeof value === 'object' && value && 'name' in value && 'message' in value);
16
+ assert(isError, 'catch clause variable is not an Error instance');
17
}
0 commit comments