(error: Error, original: unknown)
| 78 | |
| 79 | /** Keep the original value reachable without clobbering an existing chain. */ |
| 80 | const withOriginalCause = (error: Error, original: unknown): Error => { |
| 81 | if (error.cause === undefined && original !== error) error.cause = original; |
| 82 | return error; |
| 83 | }; |
| 84 | |
| 85 | const errorFromValue = (value: unknown, context: FrontendErrorContext): Error => { |
| 86 | // oxlint-disable-next-line executor/no-error-constructor -- boundary: a crash-reporting transport only understands built-in Errors; this module is the adapter that produces them |
no outgoing calls
no test coverage detected