From 0109061a84f071c77a89d90457f815c2df64a68c Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 11 Jul 2023 20:57:15 +0300 Subject: [PATCH] utils/axios: use captureMessage --- apps/web/utils/axios.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/web/utils/axios.ts b/apps/web/utils/axios.ts index 2e50bef..9d96998 100644 --- a/apps/web/utils/axios.ts +++ b/apps/web/utils/axios.ts @@ -1,4 +1,4 @@ -import { captureException, captureMessage, withScope } from '@sentry/nextjs'; +import { captureMessage, withScope } from '@sentry/nextjs'; import type { AxiosError } from 'axios'; import { isAxiosError } from 'axios'; import { pick } from 'radash'; @@ -28,8 +28,7 @@ export async function withHandleError(fn: Promise) { (Object.keys(opts) as Array).forEach((key) => { scope.setExtra(key, JSON.stringify(opts[key])); }); - captureMessage(message); - captureException(error_); + captureMessage(`${error_.message} | ${message}`); }); throw new Error(message);