I found a huge error in my master's thesis which I defended a year ago
Correct the mistake for any peer-reviewed publications (journal, conference, etc). Don't worry about the thesis published at your institution.
Reason being, your committee signed off in the work as a whole as fulfilling the merits of the degree. Yes, it's unfortunate, but theses often aren't indexed by journal searches, and even when they are, they are generally interpreted with less weight.
On the bright side, you recognized an error others might not have. Apply this lesson moving forward. In any other case, you'd have to retract.
PS - I did the same thing during my masters thesis. Didn't sleep for a week.
These things happen. It's unfortunate, but as Bryan said in his comment on your question, we're all only human. You're doing exactly what you should be doing, and now you just have to wait to hear how your department asks you to proceed.
To put things into perspective, the concept of austerity cuts as a method for bolstering economic growth stemmed from an error in a Microsoft Excel spreadsheet. Whoops. Be glad this is just your thesis and not an internationally-recognized research effort that drove over a decade of global economic policy.