Remove deprecated .to_err_msg() call