paleobiodb / data_service

The PBDB Data Service, API and table/system maintenance scripts
Artistic License 2.0
12 stars 0 forks source link

Internal server error when specifying filtering parameters in occs/refs #61

Closed castroinsua closed 6 months ago

castroinsua commented 7 months ago

Many of the parameters that are used to filter the result set in the occs/refs endpoint produce an internal server error. For example, the following request returns around 800 records:

https://paleobiodb.org/data1.2/occs/refs.json?base_name=Cetacea&interval=Miocene

But trying to filter by year produces a response with "status_code": 500

https://paleobiodb.org/data1.2/occs/refs.json?base_name=Cetacea&interval=Miocene&ref_pubyr=2005

This also seems to happen with other parameters such as ref_author, ref_title, or pub_type. However, ref_id works fine:

https://paleobiodb.org/data1.2/occs/refs.json?base_name=Cetacea&interval=Miocene&ref_id=12988

mmcclenn commented 6 months ago

Thank you for bringing this to my attention! I have fixed this bug. The reference filter parameters now work properly with the following operations:

castroinsua commented 6 months ago

Thank you very much for fixing it!