500 on POST: Prisma + mysql + nextjs
Answered
Rex posted this in #help-forum
RexOP
Hi, I'm trying to make an API call to create a new Category in my app, but when I try I get 500.
It's strange because payload is right
It's strange because payload is right
Answered by Rex
Got it!
The problem was that I was using NextRequest and req.json .
Instead of Request and await req.json()
The problem was that I was using NextRequest and req.json .
Instead of Request and await req.json()
3 Replies
Southern rough shrimp
Look at the server error logs
RexOP
Where? Cause now I'm on localhost
RexOP
Got it!
The problem was that I was using NextRequest and req.json .
Instead of Request and await req.json()
The problem was that I was using NextRequest and req.json .
Instead of Request and await req.json()
Answer