mapbox-java icon indicating copy to clipboard operation
mapbox-java copied to clipboard

When API request fails, log message for better troubleshooting

Open cammace opened this issue 8 years ago • 5 comments

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

cammace avatar Oct 17 '17 23:10 cammace

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] avatar Oct 20 '18 03:10 stale[bot]

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] avatar Oct 20 '18 22:10 stale[bot]

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

zugaldia avatar Oct 22 '18 18:10 zugaldia

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] avatar Apr 20 '19 21:04 stale[bot]

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] avatar Oct 19 '19 16:10 stale[bot]