api.congress.gov icon indicating copy to clipboard operation
api.congress.gov copied to clipboard

(bill details): requesting a bill that does not exist returns 500

Open ryparker opened this issue 1 year ago • 1 comments

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"
    }
}

ryparker avatar Apr 21 '24 00:04 ryparker

Thanks, @ryparker - we are investigating.

apreiter18 avatar Apr 22 '24 13:04 apreiter18