unify error handling using restkit-util