sentry: use captureException for GlitchTip

This commit is contained in:
vchikalkin 2023-07-11 22:05:00 +03:00
parent 4bb9508762
commit a9589f09e5

View File

@ -1,4 +1,4 @@
import { captureMessage, withScope } from '@sentry/nextjs';
import { captureException, withScope } from '@sentry/nextjs';
import type { AxiosError } from 'axios';
import { isAxiosError } from 'axios';
import { pick } from 'radash';
@ -30,7 +30,7 @@ export async function withHandleError<T>(fn: Promise<T>) {
if (key === 'data') extra = JSON.stringify(extra);
scope.setExtra(key, extra);
});
captureMessage(`${error_.message} | ${message}`);
captureException(`${error_.message} | ${message}`);
});
throw new Error(message);