mapbox / mapbox/mapbox-java

When API request fails, log message for better troubleshooting

Open
#609 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
438
Forks
117
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DirectionsResponse model and trace how API failures are currently handled when the response body is null. Confirm how the message value from a failed request should be exposed and whether it should be logged or cause a runtime exception. Done means failures such as Overview option must be full for congestion are no longer silent.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.