Skip to content

Commit

Permalink
Merge pull request #267 from JupiterOne/INT-10529-improv14
Browse files Browse the repository at this point in the history
fix access to headers in error cause
  • Loading branch information
RonaldEAM committed Apr 17, 2024
2 parents fdc0d64 + c79a992 commit eeee2e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/client.ts
Expand Up @@ -104,8 +104,8 @@ export class APIClient extends BaseAPIClient {
) {
const headers = err.cause.headers;
retryAfter = this.getDelayUntilReset(
headers.get('date') as string,
headers.get('x-rate-limit-reset') as string,
headers['date'] as string,
headers['x-rate-limit-reset'] as string,
);
}

Expand Down Expand Up @@ -440,8 +440,8 @@ export class APIClient extends BaseAPIClient {
) {
const headers = err.cause.headers;
retryAfter = this.getDelayUntilReset(
headers.get('date') as string,
headers.get('x-rate-limit-reset') as string,
headers['date'] as string,
headers['x-rate-limit-reset'] as string,
);
}

Expand Down

0 comments on commit eeee2e9

Please sign in to comment.