#GET request returning 404, but controller seems registered properly? Any ideas what I'm missing?
1 messages · Page 1 of 1 (latest)
it's odd, it appearsthat it has been mapped in the nest logs, the whole route
why am I getting a 404 then hmm
well this is an odd one as fuck.
http://localhost:3500/apis/super-service/migrations
I made a simple test endpoint in the migrations controller
public async test() {
return;
}```
I also have a "NotFound" exception handler globally, but the logs show no activity happening in that controller for that request really really weird
console.log(`Super Service listening on port ${process.env.PORT ?? 3500}`);
});```
I have a app.use('/apis/super-service/health', (req: Request, res: Response) => { return res.status(200).send(); });
and this one works --- it's only the registered controller that does not work
http://localhost:3500/apis/super-service/health returns 200
in 5 years of using nestjs I don't think I've ever been more confused
oh nevermind, the not found exception filter works
it does indeed catch the error
I've deleted my dist folder, checked my import statements for every decorator
you got a version here
yes
app.enableVersioning({
type: VersioningType.HEADER,
header: 'yeo-api-version',
defaultVersion: configService.get('CURRENT_VERSION'),
});```
that config will return 5.0
but --- it has a default version
shouldn't this work with the default version header?
this is a good time to say I haven't used NestJS versioning before