1
0
mirror of synced 2025-12-23 03:44:00 -05:00

send errors to Failbot in SSR rendering (#30153)

* send errors to failbot in SSR rendering

* wip

* progress

* tidying up

* no point awaiting something that doens't return a promise
This commit is contained in:
Peter Bengtsson
2022-08-22 18:50:18 +02:00
committed by GitHub
parent be09c09146
commit 8eb7898827
6 changed files with 117 additions and 15 deletions

View File

@@ -33,9 +33,11 @@ async function retryingGot(url, args) {
)
}
export async function report(error, metadata) {
export function report(error, metadata) {
// If there's no HAYSTACK_URL set, bail early
if (!process.env.HAYSTACK_URL) return
if (!process.env.HAYSTACK_URL) {
return
}
const backends = [
new HTTPBackend({
@@ -47,6 +49,7 @@ export async function report(error, metadata) {
app: HAYSTACK_APP,
backends,
})
return failbot.report(error, metadata)
}