Skip to content

Commit ddc2c90

Browse files
fix: Use request time to compute the retry after (open-feature#846)
1 parent 8c6c46b commit ddc2c90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/shared/ofrep-core/src/lib/api/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class OFREPApiTooManyRequestsError extends OFREPApiError {
9191
return null;
9292
}
9393

94-
return new Date(Date.now() + this.retryAfterSeconds * 1000);
94+
return new Date(this.requestTime.getTime() + this.retryAfterSeconds * 1000);
9595
}
9696

9797
const date = new Date(this.retryAfterHeader);

0 commit comments

Comments
 (0)