You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which returns a 422 but also includes this in the response body:
{"detail":[{"loc":["query","pageSize"],"msg":"ensure this value is less than or equal to 1000","type":"value_error.number.not_le","ctx":{"limit_value":1000}}]}
Displaying some of the details from the response could be useful to the user.
It is possible to check for possible values before making the GET, but that is dependent on adding support for the searchValues API (see #167) and adding pageSize to the list of parameter values that searchValues returns.
The text was updated successfully, but these errors were encountered:
JimArnow-nso
changed the title
Searching with invalid dkist.PageSize could handle 422 better and return
Searching with invalid dkist.PageSize could handle 422 better and return details
Oct 18, 2023
Fido.search(a.dkist.Page(page=1), a.dkist.PageSize(1001))
throws
HTTPError: HTTP Error 422: Unprocessable Entity
but does not give any details of what failed. Meanwhile, under the hood, the GET is equivalent to this direct curl:
https://api.dkistdc.nso.edu/datasets/v1?pageNumber=1&pageSize=1001&sortColumn=createDate
which returns a 422 but also includes this in the response body:
{"detail":[{"loc":["query","pageSize"],"msg":"ensure this value is less than or equal to 1000","type":"value_error.number.not_le","ctx":{"limit_value":1000}}]}
Displaying some of the details from the response could be useful to the user.
It is possible to check for possible values before making the GET, but that is dependent on adding support for the searchValues API (see #167) and adding
pageSize
to the list of parameter values that searchValues returns.The text was updated successfully, but these errors were encountered: