(error: Error, original: unknown)
| 69 | |
| 70 | /** Keep the original value reachable without clobbering an existing chain. */ |
| 71 | const withOriginalCause = (error: Error, original: unknown): Error => { |
| 72 | if (error.cause === undefined && original !== error) error.cause = original; |
| 73 | return error; |
| 74 | }; |
| 75 | |
| 76 | const errorFromValue = (value: unknown, context: FrontendErrorContext): Error => { |
| 77 | // 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