Skip to content

Patch requests always responds with a 405 status with Nextjs 14 #3152

Answered by mattwhitson
mattwhitson asked this question in Q&A
Discussion options

You must be logged in to vote

Well, I it out a couple minutes after posting this question I figured it out! Turns out it was just a dumb mistake I was making, I had completely forgotten that you need to wrap the different Nextjs request types like so:

export const GET = handle(app);
export const POST = handle(app);

All I had to do was add export const PATCH = handle(app); and now it works fine. I've never asked questions on Github before so I'm not sure if I should take this down or not? I'll leave it up for now in case anyone else has this problem in the future, if I should take it down someone just let me know and I will! Cheers!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@SaddamMohsen
Comment options

@SaddamMohsen
Comment options

Answer selected by mattwhitson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants