rework error handler, only loop if a response is returned