mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 05:09:05 +00:00
18 lines
304 B
TypeScript
18 lines
304 B
TypeScript
import * as Sentry from "@sentry/react";
|
|
|
|
const handleError = (
|
|
setError: Function,
|
|
errorString: string,
|
|
errorObj?: any,
|
|
) => {
|
|
setError(errorString);
|
|
|
|
if (errorObj) {
|
|
Sentry.captureException(errorObj);
|
|
} else {
|
|
Sentry.captureMessage(errorString);
|
|
}
|
|
};
|
|
|
|
export default handleError;
|