handle error events from superagent