nick1n / nicholast.fm

Last.fm Stat Utility Web App
https://nicholast.fm
21 stars 1 forks source link

Better looking and more descriptive error messages. #22

Open nick1n opened 12 years ago

nick1n commented 12 years ago

The various error messages returned from last.fm's api: 2 : Invalid service - This service does not exist 3 : Invalid Method - No method with that name in this package 4 : Authentication Failed - You do not have permissions to access the service 5 : Invalid format - This service doesn't exist in that format 6 : Invalid parameters - Your request is missing a required parameter 7 : Invalid resource specified 8 : Operation failed - Something else went wrong 9 : Invalid session key - Please re-authenticate 10 : Invalid API key - You must be granted a valid key by last.fm 11 : Service Offline - This service is temporarily offline. Try again later. 13 : Invalid method signature supplied 16 : There was a temporary error processing your request. Please try again 26 : Suspended API key - Access for your account has been suspended, please contact Last.fm 29 : Rate limit exceeded - Your IP has made too many requests in a short period

namklabs commented 12 years ago

Errors should be reflected in the interface. Bootstrap has a bunch of built-in error classes for various elements. I don't think a regular javascript alert box is good enough. How do we want to present errors? I might suggest the Alert plugin: http://twitter.github.com/bootstrap/javascript.html#alerts

namklabs commented 12 years ago

What do you think about logging errors so we can monitor them?

nick1n commented 12 years ago

Yep, I was also thinking of bootstrap's error alerts, and we can log them, but how would we do that?

namklabs commented 12 years ago

We might have to use AJAX. I don't know anything about it yet though, lol. It might involve some PHP too. I'm thinking the error would be sent via AJAX to a PHP script that logs the error either in a text file or a database. If we are logging info, we should have a terms of use statement.

nick1n commented 12 years ago

You know we don't need logging, but if we want it, what about sending them via email? Don't know if that will be better or worse, but if we did do ajax we would probably need some simple page to accept and just logs them, and actually thinking about it, it shouldn't be too difficult to setup.

nick1n commented 11 years ago

Well, since we started logging, mid November, these are the error messages users have gotten: 6: No user with that name was found (43, 25) 8: Error fetching recent tracks (38, 15) 4: This user has made their recent tracks private. Only they can access them with an authenticated session (15, 12) 29: Rate limit exceeded (18, 4)

Note: The numbers in parenthesis are (total events, unique events) unique events are a bit more import, because that number is closer to the number of actual users that are getting these errors.

So, I'm thinking we should probably take a little time and maybe help explain these particular errors to the user a little more thoroughly, and maybe even help suggest how to fix it. :)

nick1n commented 10 years ago

With version 0.4.0, Rate limit exceeded errors are handled by the last.fm module now.

Need to look into "8: Error fetching recent tracks," might be able to handle this error the same way...?