api.congress.gov
api.congress.gov copied to clipboard
(bill details): requesting a bill that does not exist returns 500
When requesting details for a bill that does not exist the API returns a 500. I expected this to return 404.
e.g.
curl --location 'https://api.congress.gov/v3/bill/118/s/2?format=json&api_key=<API_KEY>'
Returns 500:
{
"error": "cannot access local variable 'bill' where it is not associated with a value (UnboundLocalError)",
"request": {
"billNumber": "2",
"billType": "s",
"congress": "118",
"contentType": "application/json",
"format": "json"
}
}
Thanks, @ryparker - we are investigating.