nestjs/nest · error · InternalServerErrorException
HTTP adapter does not support filtering on version
Error message
HTTP adapter does not support filtering on version
What it means
Error "HTTP adapter does not support filtering on version" thrown in nestjs/nest.
Source
Thrown at packages/platform-express/adapters/express-adapter.ts:334
}
public setLocal(key: string, value: any) {
this.instance.locals[key] = value;
return this;
}
public getType(): string {
return 'express';
}
public applyVersionFilter(
handler: Function,
version: VersionValue,
versioningOptions: VersioningOptions,
): VersionedRoute {
const callNextHandler: VersionedRoute = (req, res, next) => {
if (!next) {
throw new InternalServerErrorException(
'HTTP adapter does not support filtering on version',
);
}
return next();
};
if (
version === VERSION_NEUTRAL ||
// URL Versioning is done via the path, so the filter continues forward
versioningOptions.type === VersioningType.URI
) {
const handlerForNoVersioning: VersionedRoute = (req, res, next) =>
handler(req, res, next);
return handlerForNoVersioning;
}
// Custom Extractor Versioning HandlerView on GitHub (pinned to 6ec0e2783d)
Solutions
- Express does not support per-route version filtering for the configured versioning type; use URI versioning or upgrade/verify your NestJS version supports the chosen type with Express.
- Avoid mixing VERSION_NEUTRAL filtering with a versioning type the Express adapter cannot filter on.
- Configure versioning once with enableVersioning({ type: VersioningType.URI }) and rely on path-based routing.
Example fix
app.enableVersioning({ type: VersioningType.URI });
// routes: @Controller({ path: 'cats', version: '1' }) When it happens
Trigger: Thrown at packages/platform-express/adapters/express-adapter.ts:334 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nestjs/nest@6ec0e2783d (2026-08-03).
Data as JSON: /data/errors/2dcad16f58d790b4.json.
Report an issue: GitHub.