Merge pull request #14048 from overleaf/mj-recurly-script-update

[web] recurly resync script update

GitOrigin-RevId: 798cb73f46b763f6ece6b12d63fe82fbcc6c2920
This commit is contained in:
Tim Down 2023-07-27 12:35:36 +01:00 committed by Copybot
parent 98a847ae75
commit 800c9d63b4
2 changed files with 11 additions and 4 deletions

View file

@ -472,6 +472,9 @@ const RecurlyWrapper = {
(response.statusCode !== 404 || !expect404) &&
(response.statusCode !== 422 || !expect422)
) {
if (options.headers.Authorization) {
options.headers.Authorization = 'REDACTED'
}
logger.warn(
{
err: error,

View file

@ -30,12 +30,16 @@ const ScriptLogger = {
ScriptLogger.mismatchSubscriptionsCount += 1
const mismatchReasonsString = JSON.stringify(mismatchReasons)
if (ScriptLogger.allMismatchReasons[mismatchReasonsString]) {
ScriptLogger.allMismatchReasons[mismatchReasonsString].push(
subscription._id
)
ScriptLogger.allMismatchReasons[mismatchReasonsString].push({
id: subscription._id,
name: subscription.planCode,
})
} else {
ScriptLogger.allMismatchReasons[mismatchReasonsString] = [
subscription._id,
{
id: subscription._id,
name: subscription.planCode,
},
]
}
},