Skip to content

Commit

Permalink
fix: in case the graphql returns empty
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Inacio <[email protected]>
  • Loading branch information
gusinacio committed Aug 29, 2024
1 parent d80a7d6 commit 58e425b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/indexer-common/src/allocations/query-fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,11 @@ export class AllocationReceiptCollector implements ReceiptCollector {
),
},
)
return response.data!
if (!response.data) {
throw `There was an error while querying Tap Subgraph. Errors: ${response.error}`
}

return response.data
}

// for every allocation_id of this list that contains the redeemedAt less than the current
Expand Down

0 comments on commit 58e425b

Please sign in to comment.