diff --git a/CHANGELOG.md b/CHANGELOG.md index 573700de..91279b9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Deprecated +- Checkout orders endpoint now returns an empty array + ## [2.171.1] - 2024-09-03 ### Fixed diff --git a/node/clients/checkout.ts b/node/clients/checkout.ts index b12b2236..464810ef 100644 --- a/node/clients/checkout.ts +++ b/node/clients/checkout.ts @@ -220,8 +220,15 @@ export class Checkout extends JanusClient { }) } + // Deprecated: This endpoint is deprecated and any request will return an empty array public orders = () => - this.get(this.routes.orders, { metric: 'checkout-orders' }) + this.get(this.routes.orders, { metric: 'checkout-orders' }).catch((err) => { + if (err.response && err.response.status === 405) { + return [] + } + + throw err + }) public simulation = (simulation: SimulationPayload) => this.post(