(error, metadata)
| 34 | } |
| 35 | |
| 36 | export function report(error, metadata) { |
| 37 | // If there's no HAYSTACK_URL set, bail early |
| 38 | if (!process.env.HAYSTACK_URL) { |
| 39 | return |
| 40 | } |
| 41 | |
| 42 | const backends = [ |
| 43 | new HTTPBackend({ |
| 44 | haystackURL: process.env.HAYSTACK_URL, |
| 45 | fetchFn: retryingGot, |
| 46 | }), |
| 47 | ] |
| 48 | const failbot = new Failbot({ |
| 49 | app: HAYSTACK_APP, |
| 50 | backends, |
| 51 | }) |
| 52 | |
| 53 | return failbot.report(error, metadata) |
| 54 | } |
| 55 | |
| 56 | // Kept for legacy so you can continue to do: |
| 57 | // |
nothing calls this directly
no outgoing calls
no test coverage detected