Upstash ratelimitting + trpc
In my project I use
upstash/ratelimit
(pretty much directly copy / pasted from the how-to) and trpc in my nextjs app. Right now, when people hit the ratelimit I get a TRPC error that says "Unexpected end of JSON" because upstash ratelimitting just redirects to this page (again straight from the tutorial)
Obviously this doesn't match what TRPC expects. how can I return a TRPC error from this non-trpc api route?1 Reply
Bump?