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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user