I am having trouble with a particular part of the API.
I want to retrieve the appointments for a certain officer id.
I’m trying to do this by using UkCompaniesHouse::Officer.appointments(officer_id)
in my rails app.
I receive this response:
502 Bad Gateway The server returned an invalid or incomplete response.
The steps I took were:
-
API Response Handling: Ensured that the API request was successful by checking the status code (
200 OK
). Thanks to @voracityemail 's reply. It returns 200. - Authorization: I confirmed that my API key is correctly set and has permissions for the request.
-
Correct Officer ID: I made sure the
officer_id
is valid and associated with appointments. - Parsing the Response: I double-checked that I’m using the correct path. But maybe the way it works has changed or been depreciated?
- Rate Limits: Checked if I have hit any API rate limits, which might cause server issues. But I am good!
Ran into this issue yesterday and thought I’d come back to it today but still returning 502.
Any thoughts @companies.house.api ? Thank you!