Handle errors.