Theo's Typesafe CultTTC
Theo's Typesafe Cult2y ago
6 replies
Xteripus

"Expected an error object to be thrown." At From 0 to Production - The Modern React Tutorial

Hi, I was watching Theo's "From 0 to Production - The Modern React Tutorial (RSCs, Next.js, Shadui, Drizzle, TS and more)" and at 55:35, he was implementing UploadThing to the app and I had an error at

if (!user.userId) throw new UploadThingError("Unauthorized");

and I couldn't fix it. I am using VSCode's ESLint Plugin and it gave me this error.

"Expected an error object to be thrown."

I have no idea how to fix it. Can anyone help me?

Thanks a lot!
image.png
Was this page helpful?