Next.js Discord

Discord Forum

sending post request with origin: null to non existent route throws 500 error instead of 404.

Unanswered
Peterbald posted this in #help-forum
Open in Discord
PeterbaldOP
When the origin is null (browser sets by default to https to http requests) nextjs is throwing 500 error if the route doesn't exist. Is this expected behaviour? How to handle such kind of error? I was expecting 404 not found error instead. Please help me to resolve this as I have tried everything but could find workaround to this.

0 Replies