Skip to content

Commit

Permalink
Fix retry override behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Jun 2, 2023
1 parent ffd6a87 commit c17a9b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/RequestSender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export class RequestSender {

// Max retries can be set on a per request basis. Favor those over the global setting
_getMaxNetworkRetries(settings: RequestSettings = {}): number {
return settings.maxNetworkRetries &&
return settings.maxNetworkRetries !== undefined &&
Number.isInteger(settings.maxNetworkRetries)
? settings.maxNetworkRetries
: this._stripe.getMaxNetworkRetries();
Expand Down Expand Up @@ -474,7 +474,6 @@ export class RequestSender {
const requestRetries = numRetries || 0;

const maxRetries = this._getMaxNetworkRetries(options.settings || {});

this._stripe._emitter.emit('request', requestEvent);

req
Expand Down

0 comments on commit c17a9b6

Please sign in to comment.