add keep-alive messages to server-sent events
unify error handling using restkit-util