Error Handling for Android Connected Project

47 views
Skip to first unread message

Aaron Huttner

unread,
May 5, 2012, 9:40:18 PM5/5/12
to google-a...@googlegroups.com
Is there a best practices example for handling errors on the Android app when it tries to connect to the GAE server?

i.e.
- do we have to check for network connectivity before trying or will the fire() method just throw a network connectivity not found error that we should be catching?
- What types of errors are handled in the onFailure(ServerFailure error) method of the Receiver? Are GAE server errors returned, or just logged on the server? Can we force the server to return a custom error, via the onFailure method?

ex:
request.getEntity().fire(new Receiver<EntityProxy>() {

@Override
public void onFailure(ServerFailure error) {
// what types of errors are returned here?
}

@Override
public void onSuccess(EntityProxy arg0) {
}

});

I've tried to find good examples or documentation on the types of errors returned but there doesn't seem to be much out there.

Thanks for any help.


Reply all
Reply to author
Forward
0 new messages