Skip to content

Feature/refactor v 1 be#28

Merged
TVATDCI merged 2 commits into
mainfrom
feature/refactor-v-1-be
Feb 12, 2026
Merged

Feature/refactor v 1 be#28
TVATDCI merged 2 commits into
mainfrom
feature/refactor-v-1-be

Conversation

@TVATDCI
Copy link
Copy Markdown
Owner

@TVATDCI TVATDCI commented Feb 12, 2026

  • remove next entirely for async middleware:

Edited
userModel.js

What Was Actually Wrong

  • trust proxy - Fixed in app.js (for rate limiter on Render)
  • next() in async middleware - Just removed from userModel.js:39-44
  • The Final Solution (from your own document):
  • In Mongoose 9.x with async functions:

Don't use next parameter
Don't call next()
Just return to exit early
Let errors throw naturally (async auto-catches them)

Let's see!

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
star-wars-character-data-api Ready Ready Preview, Comment Feb 12, 2026 3:32am

@TVATDCI TVATDCI merged commit a939b2b into main Feb 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant