From ad069bdf308c1c96b35de76ba10e6c1ee3f72c4d Mon Sep 17 00:00:00 2001 From: Alicia Sykes <sykes.alicia@gmail.com> Date: Sat, 11 Sep 2021 01:34:48 +0100 Subject: [PATCH] :zap: Adds filter key to error handler --- src/utils/ErrorHandler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/ErrorHandler.js b/src/utils/ErrorHandler.js index 8406d6a6..f2a6a2e2 100644 --- a/src/utils/ErrorHandler.js +++ b/src/utils/ErrorHandler.js @@ -4,11 +4,13 @@ import { warningMsg } from '@/utils/CoolConsole'; /** * Function called when an error happens - * If you wish to use an error logging service, put code for it here + * Will call to function which prints helpful message to console + * If error reporting is enabled, will also log the message to Sentry + * If you wish to use your own error logging service, put code for it here */ const ErrorHandler = function handler(msg) { warningMsg(msg); - Sentry.captureMessage(msg); + Sentry.captureMessage(`[USER-WARN] ${msg || 'Uncaptured Message'}`); }; export default ErrorHandler;