Commit graph

6 commits

Author SHA1 Message Date
Antoine Clausse
9419cc3b37 [web] Add tests to collect_paypal_past_due_invoice.js + update logging (#18310)
* Fix: Invoices collected array length comparison

Update the code with the correct condition to respect the intent of the previous implementation ("exit with non zero code when no invoicess were processed").
See 5476f39984

However, I'm not sure if erroring when no invoices are collected is actually what we want to do.

* Wrap `collect_paypal_past_due_invoice` script and export the function

* Fixup typo `accoutns`

* Log invoices collection data before throwing

* Add note: `handleAPIError` is silencing the errors

* Create a test on `collect_paypal_past_due_invoice`

* Replace `console.log` by `@overleaf/logger` (bunyan)

Our `console.warn` show up as Errors (in red) in GCP. For example the following is an error in GCP:
```
Errors in attemptInvoiceCollection with id=2693634 OError: Recurly API returned with status code: 400
```
https://github.com/overleaf/internal/blob/5476f39/services/web/scripts/recurly/collect_paypal_past_due_invoice.js#L9

---

Does it correctly set the levels as warnings if we use `@overleaf/logger`

GitOrigin-RevId: 37c8bdf4afd8cef4706700aafb44480ec8966a74
2024-05-15 08:04:46 +00:00
Eric Mc Sween
e6b805b885 Merge pull request #4242 from overleaf/ho-paypal-script-exit-code
exit with non zero code when no invoicess were processed

GitOrigin-RevId: df449964fc830f689d972d9ad3ed6b352c1b7c5c
2021-07-03 02:09:17 +00:00
Alf Eaton
1be43911b4 Merge pull request #3942 from overleaf/prettier-trailing-comma
Set Prettier's "trailingComma" setting to "es5"

GitOrigin-RevId: 9f14150511929a855b27467ad17be6ab262fe5d5
2021-04-28 02:10:01 +00:00
Alf Eaton
2ff1cf43d6 Merge pull request #3470 from overleaf/eslint
Upgrade and configure ESLint

GitOrigin-RevId: ad5aeaf85e72c847a125ff3a9db99a12855e38aa
2020-12-16 03:08:28 +00:00
Timothée Alby
508556c835 Merge pull request #2409 from overleaf/ta-recurly-collection-script-fix
Recurly Collection Script Fix

GitOrigin-RevId: 3012d06a9122636ca1997e2e66899a36b386e5be
2019-11-27 13:21:27 +00:00
Timothée Alby
e000fd4615 Merge pull request #2343 from overleaf/ta-invoice-attempt-callback
Collect Past Due Invoices on Paypal Billing Info Updates

GitOrigin-RevId: 6a0d298db8589ae6ba7cb62e4dfd562a1f292db0
2019-11-12 09:14:58 +00:00