mapbox / mapbox-java

The Mapbox Java SDK – Java wrappers around Mapbox APIs and other location data
https://docs.mapbox.com/android/java/overview/
MIT License
418 stars 121 forks source link

When API request fails, log message for better troubleshooting #609

Open cammace opened 6 years ago

cammace commented 6 years ago

Just spent some time figuring out why my response body was null only to learn that the request was failing with a message Overview option must be full for congestion. We should add a field for message in the DirectionsResponse for example and if that message isn't null, throw a runtime exception or at least log it.

cc: @zugaldia

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

zugaldia commented 5 years ago

Thanks Mr. @stale - I'm gonna reopen this one though. Even if there hasn't been any activity here recently, we should still make sure we include support for error messages in API responses like the one described in OP: https://www.mapbox.com/api-documentation/#directions-api-errors.

/cc: @osana

stale[bot] commented 5 years ago

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.