Similar to the issue with malformed country_id parameters, if a user accesses the get_search endpoint and inputs a malformed type query parameter, the endpoint returns with a 500 Internal Server Error, as opposed to some sort of error response (perhaps 400 Bad Request?), because the function raises a ValueError when the error is encountered
This is due to code on line 87 of endpoints/search/search.py; if an empty query is passed, the server throws an AttributeError, as the query has no attribute 'lower', returning a 500 Internal Server Error
Similar to the issue with malformed
country_id
parameters, if a user accesses theget_search
endpoint and inputs a malformedtype
query parameter, the endpoint returns with a500 Internal Server Error
, as opposed to some sort of error response (perhaps400 Bad Request
?), because the function raises a ValueError when the error is encountered