Skip to content

Commit

Permalink
feat: add an assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kilted-andres committed Mar 19, 2024
1 parent 887b558 commit ab3e20f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backend/revoker/subScan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ export async function getEvents({
JSON.stringify(payloadForEventsListRequest, null, 2),
);

if (parameters.page >= 100) {
throw new Error(
`Page ${parameters.page} exceeds Subscan's paging limit of 100.`,
);
}

const {
data: { count, events },
} = await got
Expand Down

0 comments on commit ab3e20f

Please sign in to comment.