Handle request errors.