Skip to content

Commit

Permalink
moving on up as the m people and primal scream both said
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Jan 31, 2024
1 parent 9e4058e commit b814e3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rate-limiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export class RateLimiter {
}

public checkForLimiting = (httpResponse: MinimalHTTPResponse): void => {
let text: string | undefined
try {
text = httpResponse.responseText
if (!text || !text.length) {
return
}
const text: string | undefined = httpResponse.responseText

if (!text || !text.length) {
return
}

try {
const response: CaptureResponse = JSON.parse(text)
const quotaLimitedProducts = response.quota_limited || []
quotaLimitedProducts.forEach((batchKey) => {
Expand Down

0 comments on commit b814e3b

Please sign in to comment.