export class OMSClient extends OMS {
constructor(context: IOContext) {
super(context, {
name: "oms-client",
retries: 3,
initialBackoffDelay: 800,
exponentialBackoffCoefficient: 2,
});
}
/**
* Invoice an order
*/
public async invoiceOrder(orderId: string, payload: InvoicePayload) {
return this.http.post(`/api/oms/pvt/orders/${orderId}/invoice`, payload, {
metric: "oms-invoice-order",
});
}
/**
* Update tracking info (can be used after invoicing as well)
*/
public async updateTracking(orderId: string, payload: TrackingPayload) {
return this.http.post(`/api/oms/pvt/orders/${orderId}/invoice`, payload, {
metric: "oms-update-tracking",
});
}
}
I have extended the VTEX OMS client and configured retry options (retries, initialBackoffDelay, exponentialBackoffCoefficient) in the constructor.
Do these configurations ensure that API calls made via this.http.post() automatically use exponential backoff on failures, or is additional retry/error-handling logic required at the method level?