I have may reservations about his beatification/canonization (I am generally learly of doing such so quickly after death in general), but one needs to accept the action of the Church here.
St. Thomas Aquinas holds that canonizations are in between two different sort of actions by the Church. Namely, the Church, on one hand, judges particular facts of persons and events. Even a pope may mistakenly believe a man guilty or innocent of a crime, for instance. And it is not impossible that a pope should, say, excommunicate someone wrongly (the course there is still obedience as far as the legal effects go). The Church also teaches on matters of faith and universal truthes. Here the Church is protected from error. Canonization occupies a middle place, insofar as it involves a judgment of the life and virtue of this person it is like any other judgment that may err. But it also pertains to the doctrine of the Church, as we hold to the intercession of the saints. Further the Church would err in her worship were some of the saints to be in hell.
It is fully possible that on a prudential level a person be mistakenly canonized./ Maybe his life was not that great of an example. Maybe the Church was mistaken about him exhibiting great virtue. But were the person to be among the damned rather than the blessed, the Church's error would make it wrong to honor that person in the liturgy
The difference between canonization and beatification, and prior to that formal process, between saints and blesseds recognized through custom, is that blessed are those whom the Church permits to be venerated and/or requires only in a certain place, congregation or local Church. Whereas in Canonization, the person is venerated by the whole Church, not merely by permission, but the Church actively bids said veneration. That is why canonization is infallible, and prior to that formal process, the recognition of people like Augustine as saints is infallible, it would be the universal Church error in her worship and further requiring the faithful to err.
St. Thomas says
I respond. It must be said that something may be judged possible considered in itself, which is discovered to be impossible in relation to some other thing extrinsic to it.
Therefore I say, that the judgment of those who preside over the Church can be in error in whiatever matter, if we look only to their persons. But if divine providence is considered, in which the Holy Spirit directs His Church that she should not err, just as He promised in John X "that the coming Spirit will teach all truth," namely teach of everything necessary for salvation, it is certain that it is impossible for the judgment of the Universal Church to err in those matters which pertain to the faith.
Whence the teachings which are born in judgment of the pope, for whom it pertains to determine matters of faith, are to be upheld over the scriptural opinions of any wise men whatsoever; as is seen with Caiphas who, although unworthy, was still the high priest and is read to prohesy in his ignorance (John 10:51). But in other teachings which pertain to particular facts, as when matters of ownership are treated, or of crimes, or of other things of this sort, it is possible that the judgment of the Church errs because of false evidences.
But the canonization of saints is a means between these two things. Nevertheless, since the honor which we exhibit to the saints is a certain sort of profession of the faith, through which we believe in the glory of the saints, it must be piously believed that here as wll the judgment of the Church cannot be in error.
(Quodlibet IX, q. 8 co.)
This would mean that it is not a dogma (hence not a heresy) to deny the sainthood of a saint, but it would still be sinful error. While the sainthood of X person is not a matter of the deposit of faith, to deny it would go against the profession of Faith which the Church makes in her liturgy.
People mistake infallible for dogma. While all dogmas are infallibly taught, not all infallible teachings are dogma. Besides canonization, there are also teachings about truths of reason that must be held as infallible. They are not dogma (de fide) but still infallible whenever they are inherently presupposed by dogma or necessitated by it. There are also dogmatic facts, e.g., that Trent was an ecumenical council, that Pius IX was pope. If you could not trust those, then how can you trust their teachings?
εἰ ἐμὲ ἐδίωξαν, καὶ ὑμᾶς διώξουσιν: εἰ τὸν λόγον μου ἐτήρησαν, καὶ τὸν ὑμέτερον τηρήσουσιν.