Updates helper to handle request errors