REST API should return a proper status code when rows=0 is combined with cursor
Observed behavior
REST API returns 500 and a stacktrace when rows=0
is combined with cursor
: https://api.crossref.org/works?cursor=*&rows=0
This parameter combination does not make sense, cursor iteration with 0 rows on a page would be infinite for non-empty sets.
Expected behavior
This should return 400 and a proper JSON error message, similarly to https://api.crossref.org/works?row=0
How urgent
Not urgent, but it can result in false positive 500s.
Definition of ready
-
Product owner: @ppolischuk1 -
Tech lead: @dtkaczyk -
Service:: or C:: label applied -
Definition of done updated -
Acceptance testing plan: -
Weight applied
Definition of done
-
Unit tests identified, implemented, and passing -
Code reviewed -
Available for acceptance testing via a staging URL, or otherwise -
Consider any impacts to current or future architecture/infrastructure, and update specifications and documentation as needed -
Knowledge base reviewed and updated -
Public documentation reviewed and updated -
Acceptance criteria met -
AC 1 -
AC 2
-
-
Acceptance testing passed -
Deployed to production
Notes
Edited by Patrick Polischuk