LibraryOfCongress / api.congress.gov

congress.gov API
605 stars 38 forks source link

/committee/{chamber}/{committeeCode} only works for subcommittees #180

Closed Narlotl closed 5 months ago

Narlotl commented 7 months ago

The response for the Education and the Workforce Committee (/committee/house/hsed00), which has no parent is

{
    "error": "'NoneType' object has no attribute 'in_current_congress' (AttributeError)",
    "request": {
        "chamber": "house",
        "contentType": "application/json",
        "format": "json",
        "systemCode": "hsed00"
    }
}

The response for the Workforce Protections Subcommittee (/committee/house/hsed10) has a response

{
    "committee": {
        "bills": {
            "count": 1177,
            "url": "https://api.congress.gov/v3/committee/house/hsed10/bills?format=json"
        }
        ...
    }
}


This result is consistent across all committees in Congress 118, if it has a parent, the status is 200, otherwise it's 500.

rbram commented 7 months ago

Hello. Thanks for your feedback. We have replicated this issue and have created a bug ticket to fix it. Please monitor the change log for updates on this.