Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(committee, committee/{house}) - returns 500 when passing fromDateTime param #290

Open
njgingrich opened this issue Nov 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@njgingrich
Copy link

njgingrich commented Nov 21, 2024

Certain equests to committee endpoints:

  • https://api.congress.gov/v3/committee
  • https://api.congress.gov/v3/committee/house
  • https://api.congress.gov/v3/committee/senate

Return a 500 response if a fromDateTime parameter is passed with certain dates.

Error response:

{
  "error": "cannot access local variable 'result' where it is not associated with a value (UnboundLocalError)",
  "request": {
    "chamber": "senate",
    "contentType": "application/json",
    "format": "json"
  }
}

Example requests that failed:
https://api.congress.gov/v3/committee/senate?fromDateTime=2024-11-01T00:00:00Z
https://api.congress.gov/v3/committee/house?fromDateTime=2024-11-20T00:00:00Z
https://api.congress.gov/v3/committee?fromDateTime=2024-11-01T00:00:00Z
https://api.congress.gov/v3/committee?fromDateTime=2024-08-02T00:00:00Z
https://api.congress.gov/v3/committee?fromDateTime=2024-07-01T00:00:00Z&toDateTime=2024-09-01T00:00:00Z

Exampe successful request:
https://api.congress.gov/v3/committee?fromDateTime=2024-07-01T00:00:00Z

My initial hypothesis was that the endpoint is erroring if there are no committees with update_dates returned, but another failed request is https://api.congress.gov/v3/committee?fromDateTime=2024-08-01T00:00:00Z. The successful request above however returns a committee with an update_date of "2024-08-27T17:40:40Z", which should be included when passing a fromDateTime of 2024-08-01T00:00:00Z but instead the endpoint 500s.

@wblackerby wblackerby added the bug Something isn't working label Nov 21, 2024
@wblackerby wblackerby added this to the Near term backlog milestone Nov 21, 2024
@wblackerby
Copy link
Collaborator

Thanks for reporting this, @njgingrich. I was able to replicate the problem. We will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants