From ddac3a9e8bf0ae2a71f38bb1ad5b6410f84cb2df Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 1 May 2024 10:04:24 +0200 Subject: [PATCH] Removed Sentry error capturing for failed URL decoding fix https://linear.app/tryghost/issue/SLO-79/incorrectusageerror-the-url-httpsblogkongregatecompercentc0-couldnt-be - we added this Sentry captureException whilst fixing a bug where decodeUrl could fail, and throw a 500 exception - we added handling for that case and returned an empty string, but we also added Sentry error capturing - at this point, I don't think we need to be capturing errors in Sentry, because the issue is already handled, and it only usually happens with malicious/incorrect URLs - this is our #2 cause of Sentry alerts, so it's good to clean it up --- ghost/core/core/frontend/helpers/url.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/ghost/core/core/frontend/helpers/url.js b/ghost/core/core/frontend/helpers/url.js index c99213f4a0..4e5e19103b 100644 --- a/ghost/core/core/frontend/helpers/url.js +++ b/ghost/core/core/frontend/helpers/url.js @@ -7,7 +7,6 @@ const {metaData} = require('../services/proxy'); const {SafeString} = require('../services/handlebars'); const logging = require('@tryghost/logging'); -const sentry = require('../../shared/sentry'); const errors = require('@tryghost/errors'); const {getMetaDataUrl} = metaData; @@ -26,7 +25,6 @@ module.exports = function url(options) { message: `The url "${outputUrl}" couldn't be escaped correctly`, err: err }); - sentry.captureException(error); logging.error(error); return new SafeString('');