(err: Error)
| 547 | } |
| 548 | |
| 549 | export function findErrorDefinition(err: Error) { |
| 550 | const error = errorsMap.find(([ErrorType]) => { |
| 551 | return err instanceof ErrorType || (err && err.name === ErrorType.name); // in some cases, such as forked process, the received err is serialized. |
| 552 | }); |
| 553 | return error; |
| 554 | } |
| 555 | |
| 556 | function getErrorFunc(errorDefinition) { |
| 557 | if (!errorDefinition) return null; |
no outgoing calls
no test coverage detected