fix the handle_error fix