Is a corrigendum required for this error?
Whether or not a corrigendum is issued is usually decided by the editor(s).  You should talk about this matter with your coauthor(s) to make sure everyone is on the same page.  If they agree an error has been made, you can contact the editor and detail the nature of the error, it's impact on the results or lack thereof, and provide the corrections.  If the error significantly altered the results and conclusions of the paper you'd be more in the territory of a retraction, but if as you say the paper remains essentially intact then this shouldn't be a worry.

If the editor rejects the need for a corrigendum, there's not much you can do about that, but you could include a page on your professional site detailing the corrections you felt necessary, or possibly even upload to the arxiv if appropriate.

Making sure coauthors know what you're doing here is important. They will be understandably upset if they are caught unawares by this.  Things get complicated if your coauthor(s) disagree with your assessment, however, or otherwise don't want you to pursue the matter.  That's a different sort of minefield needing a different question and answer.  The short of the matter usually ends up being "is this a hill you're willing to die on or not?"