-
Notifications
You must be signed in to change notification settings - Fork 52
Better error handling in new API #121
Comments
Added more specific messages for different error codes. As for generic code (0) messages - I think that it is better to not rely on them and just show API generic error message, as different API implementations can implement them differently. Also it solves the problem of this messages localization. Feel free to reopen if you think this behaviour should be different. |
Show generic error message is a good idea, but I consider that if the server gives a message is a good idea show them. Some like this:
Or adding a new string
Obviously only show the message if server provides message string. I think that this may help to user to know why the server is failing. I think that this is a good idea for the code 0 and for |
For generic api error app can show following: |
Added showing generic error message. |
@Tapchicoma I find an issue with this in the If the server returns some like this:
The In fact, is equal valid this:
Or this:
|
And I think that we must manage responses without
Or with blank message like this:
In this cases, I think that we must response: |
Fixed raised issues. |
At this moment every error given by *sonic server are showed in Ultrasonic as a A network error occurred. Please check the server address or try again later.
This is insufficient in some cases where the server are providing an error message to client. For example, Supysonic doesn't support video, and when you try to access to video api the server gives the following message.
The error messages are always equal, the
status
value isfailed
and it gives amessage
and an errorcode
. I think that Ultrasonic must support this messages and show them to user to avoid false positive bugs.Some samples:
getGenres is unsupported in Supysonic.
A user/password error.
The text was updated successfully, but these errors were encountered: