From c51080bbb8d31eb59312de0a0f9f4d6776324948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20M=C3=A9vollon?= Date: Tue, 9 Jan 2024 10:56:04 +0100 Subject: [PATCH] fix: fetch exception to sentry --- src/utils/rest-fetcher.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/rest-fetcher.ts b/src/utils/rest-fetcher.ts index 17c4077f..06509aa0 100644 --- a/src/utils/rest-fetcher.ts +++ b/src/utils/rest-fetcher.ts @@ -1,4 +1,5 @@ import logger from "./logger" +import * as Sentry from "@sentry/nextjs" const fetcher = async (url: string, params: Record) => { try { @@ -9,7 +10,8 @@ const fetcher = async (url: string, params: Record) => { } return response } catch (error) { - logger.error("Error attempting to fetch", error) + logger.error(error, "Error attempting to fetch") + Sentry.captureException(error) } }