-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controller gets mapped but returns 404 when trying to access routes #4269
Comments
@DaCurse this is the same thing I warned you about on Discord yesterday relating to #4114. In short, the routes do get mapped, but they get mapped after a not found handler has already been mapped, so while they do exist in the route handler, the routes can never be called. #4186 is a PR with a possibility to fix it, if you'd like to take a look at the discussion there. |
@jmcdo29 Thank you, I will follow that pull request |
I found a workaround |
Still getting this error on |
@j-a-h-i-r please create a new issue with a minimum reproduction Repository. |
Hi, I've created an issue #7384 |
Bug Report
Current behavior
When running my application, the console says that a certain controller's routes were mapped but when I try to acess them via postman I get a 404 error
My controller is connected to a module which has it's own application created using
NestFactoryStatic
, so this might be the issue. I have also tried creating various dummy routes, setting a global prefix, everything was logged to the console as it was working but it did not. Routes for the other application being created using anotherNestFactoryStatic
worked without problem.Input Code
Controller:
Module:
main.ts:
Expected behavior
The routes should return a response
Environment
The text was updated successfully, but these errors were encountered: