Skip to content

Commit

Permalink
fix: correct logic for processing request
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrzy committed Sep 18, 2023
1 parent d120ecb commit f4f0ed3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const bggXmlApiClient = {
for (let i = 0; i < maxRetries; i++) {
try {
const resourceUrl = createResourceUrl(resource, queryParams)
const response = await client.get<T & { message?: string }>(resourceUrl)
if (response.message && response.message.includes('processed'))
const response = await client.get<T>(resourceUrl)
if (response && (response as string).includes('processed'))
throw new Error('processing...')

return response
Expand Down

0 comments on commit f4f0ed3

Please sign in to comment.