ayyubibrahimi / us-post-data

MIT License
4 stars 1 forks source link

Pagination Error #25

Closed MattInternet closed 1 month ago

MattInternet commented 1 month ago

The pagination appears to have some error where the final page of data returns a 500.

An example of this can be seen on the utah page where there the dataset contains ~28,000 cops. This means if users set their page size to 10,000 they should see 2 full pages (each with 10k results) and one page with ~8k results. Instead they get the first 2 but the last one fails with a 500.

The requests/responses are as follows: https://national.cpdp.co/api/fetchStateData?state=Utah&page=1&pageSize=10000 | 200 OK | 10k rows https://national.cpdp.co/api/fetchStateData?state=Utah&page=2&pageSize=10000 | 200 OK | 10k rows https://national.cpdp.co/api/fetchStateData?state=Utah&page=3&pageSize=10000 | 500 FAIL | NA

ayyubibrahimi commented 1 month ago

Fixed in PR#18 in the front-end repo. Thanks!