(error: Error)
| 2 | |
| 3 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack |
| 4 | export const getErrorStackWithMessage = (error: Error): string => { |
| 5 | const stack = error.stack ?? ''; |
| 6 | return stack.startsWith('Error:') ? stack : `${error.message}\n${stack}`; |
| 7 | }; |
| 8 | |
| 9 | const isErrorLike = (err: unknown): boolean => { |
| 10 | if (err instanceof Error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…