Comments (7)
Please feel free to sketch out an initial implementation of how errors should be propagated. I'll happily take input on how to improve this library.
/cc @samthor who has a lot more knowledge of how Go code should be written than I.
from google-maps-services-go.
There's two approaches I suppose. Either define different Err...
objects that are returned, e.g. ErrOverQueryLimit
, or add helper methods:
if maps.IsOverQueryError(returnedErr) {
..
}
from google-maps-services-go.
@ebati have you made any progress on this issue?
I too would be interested in a more consistent error handling.
For instance, the Places API implementation still treats ZERO_RESULTS as an error.
I was personally thinking that ZERO_RESULTS should not return an error but an empty response (per the API docs: ZERO_RESULTS indicates that the search was successful but returned no results).
It would be nice to be able to differentiate between the other errors without having to compare the error string!
I could take a stab at it if it helps.
from google-maps-services-go.
Since we moved to a different provider, i didnt use this library so i couldnt make time to work on this. I should have noted here. Sorry for thatπ
from google-maps-services-go.
@peergynt it would be great if you could send a PR with a consistent ZERO_RESULTS handling approach.
It'd help us a lot.
Thx!
from google-maps-services-go.
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
from google-maps-services-go.
Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.
from google-maps-services-go.
Related Issues (20)
- Directions API: Unmarshal error in detecting Route.Legs as type string HOT 1
- Go Version typo in readme HOT 1
- metrics.Request receives an already drained *http.Response HOT 2
- Is there a way to set range for radius parameters? HOT 2
- googleMap Error: connect ECONNREFUSED 0.0.0.0:443 HOT 1
- maps.Client Automatic Retry? Exponential Backoff? HOT 1
- Static maps map_id parameter support HOT 2
- feat: add relative_time_description property to PlaceReview HOT 2
- Places Search has no json tag HOT 1
- ReverseGeocode: invalid character 'U' looking for beginning of value HOT 2
- Empty spaces in the README for the go get command HOT 2
- Client.PlaceDetails fails for ID ChIJUXcBoFD-nkcR3s74TnqlDHM HOT 5
- ParsePlaceSearchFieldMask missing case for 'business_status' HOT 2
- Address Validation API missing HOT 3
- Need extra "new line character" for few postalcodes to geolocate them HOT 1
- New APIs: Address Validation, Datasets, Fleet Engine, new Places API, Routes API
- Add support for Address Descriptors to Geocoding
- @chomsin HOT 1
- @chomsin HOT 1
- Come and see β€ππXπploypoli streaming live on #BIGOLIVE and make new friends! https://slink.bigovideo.tv/BuIBpW ---γ 1 @chomsin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-maps-services-go.