You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Robust error handling when interacting with API #22
The current REST interactions with the API frequently swallow errors and throw up NullPointerExceptions without much warning.
A more robust error handling system is in order. It should give the user the option to check for errors wherever the library sends a request. This may require rather large breaking changes.
Take DestinyAPI.getMemberFromSteamID
We want to wrap the return with some sort of container which can be checked.
Then when handling the result we should be able to use functions like
response.isOkay() // if the request completed okresponse.isError() // api returned an errorresponse.getErrorMessage() // return error message from apiresponse.inner() // returns the BungieUser objectresponse.isApiOnline() // is the api online? or was it another errorresponse.inherit(newobject) // pass error messages and such with a new object, like converting jsonobject to BungieUser
Activity
#22 - Add BungieResponse, additional fixes and new exception structure
#22 - Progress towards response structure, update copyright
#22 - Convert more stuff
#22 - Convert more stuff
#22 - Added documentation, more work
#22 - Final for this attempt
#22 - Throw APIException
#22 - Add more error catching
#22 - Don't refresh every time, documentation
#22 - Update copyright and dependencies
#22 - Update README and other docs