From 195785194d37e8e19f823c1a3d66ebad968046cd Mon Sep 17 00:00:00 2001 From: Jessica Lawshe Date: Mon, 22 Feb 2021 09:02:00 -0600 Subject: [PATCH] Merge pull request #3684 from overleaf/pr-increase-log-level-payment-form-422s Increase Recurly 422 log level to error GitOrigin-RevId: 6ce0bca338d81660b62b74584a851a825114c4f2 --- .../app/src/Features/Subscription/SubscriptionController.js | 2 +- .../test/unit/src/Subscription/SubscriptionControllerTests.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index 9496e18419..642641fc3d 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -225,7 +225,7 @@ module.exports = SubscriptionController = { err instanceof SubscriptionErrors.RecurlyTransactionError || err instanceof Errors.InvalidError ) { - logger.warn(err) + logger.error({ err }, 'recurly transaction error, potential 422') return HttpErrorHandler.unprocessableEntity( req, res, diff --git a/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js b/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js index 1dd54e3949..bcf98f1a44 100644 --- a/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js +++ b/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js @@ -109,7 +109,8 @@ describe('SubscriptionController', function() { '../../infrastructure/GeoIpLookup': this.GeoIpLookup, 'logger-sharelatex': { log() {}, - warn() {} + warn() {}, + error() {} }, 'settings-sharelatex': this.settings, '../User/UserGetter': this.UserGetter,