Phantom 404 response when persisting data to Mongo #892
Unanswered
megaton-neutrino
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The communication flow ends prematurely as my route handler service function persists data to mongo.
app.config.ts
app.use(attachApiResponseObject); app.use("/api", routes)routes/index.ts
router.use("/users", usersRoutes);routes/user.routes.ts
router.post("/:id/follow", userService.verifyUserSession, followUser);controllers/users.controller.ts
services/user.service.ts
these are the Colyseus logs:
The entire route executes reaching the endpoint completely. The data is persisted to the db, the apiResponse runs as expected. The problem lies in that Express/Colyseus(???) sends a phantom 404 directly after "const [follower, target] = await Promise.all([..." runs successfully. The subsequesnt req.apiResponse.success has no effect. Why could this be happening?
I can post more code if necessary
thank you
Beta Was this translation helpful? Give feedback.
All reactions