Open
Description
Currently, we're reporting back a Throwable
with a tweaked message as a result of
Clients can parse the string Throwable.message
or print the whole thing but there isn't an easy way to tell the user the reason e.g. if it was offline or service error:
if ( /* is offline error */ )
// display prompt telling user to check network connection
else
// display user message apologizing for service being down
This can't be easily implemented with given information from the Throwable
.
This ticket tracks the feature request of adding some kind of Error
object including the Reason
so that developers can use this extra information to act accordingly to their use cases (e.g. to determine what messaging to display).
Reason
s may include offline vs service error, authentication failure, bad request, etc.
cc @mapbox/navigation-android