windowsphonehacker / SparklrWP

WIP WP client for sparklr.me
MIT License
5 stars 1 forks source link

Better error handling in SparklrClient #52

Closed jessenic closed 10 years ago

jessenic commented 11 years ago

Currently requestJsonObject does not have proper error handling for cases when the server returns an error for the request, for example when the user is not allowed to see another user's profile and the server will return the following:

{
    "error": true,
    "info": {
        "notFriends": true,
        "following": false
    }
}
the-eater commented 11 years ago

requestJsonObject shouldn't do any error handling (except corrupt JSON and http codes) all error handling of such problems should be done for example in the getUser function :)

jessenic commented 11 years ago

@EaterOfCorpses Last time I checked the requestJsonObject did not even pass the error to the handler, only the exception.

the-eater commented 11 years ago

well the error is in the Exception and the error like that JSON should be done in the repsonse classes