Ferry location api returns 502 when called in Python or Go but not via Curl or the Web UI

As per the title. Tried setting the User-Agent to "curl/7.58.0" in both Go and Python but no dice. Same 502 error. Curl: curl https://api.at.govt.nz/v2/public/realtime/ferrypositions --http1.1 -H 'Ocp-Apim-Subscription-Key:$api_key' {"status":"OK","response":[{"mmsi":512000027... Python: >>> import requests >>> r = requests.get("https://api.at.govt.nz/v2/public/realtime/ferrypositions", headers={"Ocp-Apim-Subscription-Key": "$api_key"}) >>> r.status_code 502 >>> r.content b'<html><head><title> Server Error </title></head><body>\r\n <font color="\\&quot;#aa0000\\&quot;">\r\n <h2>Server Error.</h2>\r\n </font>\r\n\r\n There was an unexpected error in the request processing.\r\n </body></html>'

Comments

  •  
    Thank you for your feedback. We have forwarded your query to our developers to see if it’s a quick fix or not. Either way we’ll look to have an update back to you in the next 2 weeks.
    Posted by Hidden Tue, 16 Feb 2021 22:49:56 GMT
  •  
    Our developers found a bug related to the ferry positions endpoint and will priorities a fix for this. In the meantime, you can include the following in your header parameters: "Accept-Encoding": None Thank you.
    Posted by Hidden Wed, 17 Feb 2021 21:26:03 GMT


You're not signed in. Please sign-in to report an issue or post a comment.