Modified reset_error to accept a string with a list of codes