Skip to content

Commit

Permalink
fix retry conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
tyiuhc committed Jan 30, 2024
1 parent 4cb845f commit 751a4bb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/node/src/remote/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export class RemoteEvaluationClient {
return await this.doFetch(user, this.config.fetchTimeoutMillis, options);
} catch (e) {
console.error('[Experiment] Fetch failed: ', e);
if (!this.shouldRetryFetch(e)) {
throw e;
}
try {
return await this.retryFetch(user, options);
} catch (e) {
console.error(e);
if (this.shouldRetryFetch(e)) {
try {
return await this.retryFetch(user, options);
} catch (e) {
console.error(e);
}
}
throw e;
}
}

Expand Down

0 comments on commit 751a4bb

Please sign in to comment.