I am getting an error while testing the Forgot Password API in my Express app
10:50 01 Feb 2026

I am testing my Forgot Password API in my Node.js + Express application. I send a POST request to the following URL with a JSON payload:

POST http://localhost:4000/api/v1/auth/password/forgot

The request body I am sending is:

{
  "email": "amirbro123@gmail.com"
}

Instead of working, I get the following error response:

{
  "success": false,
  "message": "next is not a function"
}

I am using asyncHandler in my middleware, but the API crashes when calling it. I want to understand why "next is not a function" is happening and how to fix it.
node.js mongodb express error-handling fire-and-forget