readmeio / metrics-sdks

SDKs and integrations for ReadMe's Metrics platform
https://readme.com/metrics
11 stars 25 forks source link

503 - Service Unavailable error in Realtime API Request #929

Closed basiq-ash closed 1 year ago

basiq-ash commented 1 year ago

Description:

I encountered an issue when making a request to the Realtime API. The request is resulting in a 503 Service Unavailable error, and there are additional errors related to server responses.

image (11)

Steps to Reproduce:

Make a GET request to the Realtime API: [Attaching Demo Video]. Observe the 503 Service Unavailable error. See errors related to 400 Bad Request in responses.

Demo Video:

https://github.com/readmeio/metrics-sdks/assets/102712545/a31e601a-d78c-4785-9e1d-7562996ff540

Additional Information:

Error message details:

[ { "message": ".query.timezone should match pattern \"^[A-Za-z0-9/_+-]+$\"", "params": { "pattern": "^[A-Za-z0-9/_+-]+$" } } ]

The issue appears to be related to the timezone parameter in the request.

API Docs: https://api.basiq.io/reference/introduction

brendanluna commented 1 year ago

Hi @basiq-ash ! The fetches on this page require the client code to resolve timezone using new Intl.DateTimeFormat().resolvedOptions().timeZone and it appears that this is returning undefined for some reason.

If you are using MacOS Sonoma, there might be a bug that is causing issues with certain applications (including Chrome) being unable to properly resolve timezone. This issue has been reported on an Apple forum thread and a reddit thread.

As a workaround for now, you can try running the following command and then retry the page:

TZ=Australia/Sydney open -b com.google.Chrome

Note: you'll need to adjust the TZ identifier to whichever timezone most closely aligns with your location

basiq-ash commented 1 year ago

Thanks @brendanluna I've updated to Sonoma 14.1 and that fixed the location services. Cheers for that.

brendanluna commented 1 year ago

@basiq-ash Happy to help, sorry for the trouble on that! Appreciate you raising it.

basiq-ash commented 1 year ago

Thanks for the quick workaround @brendanluna really appreciate your help 👏