algoliasearch-client-javascript
algoliasearch-client-javascript copied to clipboard
Firebase-related networking issues
It happens quite often that Firebase users reports connectivity issues to Algolia. Errors like:
-
NetworkError: connect ETIMEDOUT
-
{"name":"RetryError","message":"Unreachable hosts - your application id may be incorrect. If the error persists, contact [email protected].",
- also for free Firebase plans - networks call are totally disabled (read section Outbound networking of https://firebase.google.com/pricing/) so they also get an error that might not be super easy to understand from our API client
From a DX point of view I'm wondering whether we could make our API client slightly smarter, and:
- detect whenever we're on Firebase and include it in the user agent
- fail smartly when the network call is rejected because of a free plan (I assume the error we get when on this environment could be catch?)
- maybe increase the timeouts, as I think from time to time it's really network reliability issues. Maybe our retry strategy is too aggressive?
Would love to get our experts' POV
The error telling people to contact support is definitely subpar, there must be some way to detect it's firebase blocking the request.
It seems like this occurs for us after updating from 3.33.0 to 4.14...