(error)
| 1 | const isErrorWithMessage = (error) => { |
| 2 | return typeof error === 'object' && error !== null && 'message' in error && typeof error.message === 'string' |
| 3 | } |
| 4 | |
| 5 | const toErrorWithMessage = (maybeError) => { |
| 6 | if (isErrorWithMessage(maybeError)) return maybeError |
no outgoing calls
no test coverage detected