nestjs/nest · error
Route ${method} ${shadowedPath} (${shadowedHandlerLabel}) is
Error message
Route ${method} ${shadowedPath} (${shadowedHandlerLabel}) is shadowed by ${method} ${winnerPath} (${winnerHandlerLabel}). The first-registered route will match all matching requests on order-sensitive adapters. What it means
Error "Route ${method} ${shadowedPath} (${shadowedHandlerLabel}) is shadowed by ${method} ${winnerPath} (${winnerHandlerLabel}). The first-registered route will match all matching requests on order-sensitive adapters." thrown in nestjs/nest.
Source
Thrown at packages/core/router/route-conflict-detector.ts:194
* conflict into a single `RouteConflictException`.
*/
public static handle(
conflicts: RouteConflict[],
policy: RouteConflictPolicy | undefined,
logger: Logger,
): void {
if (conflicts.length === 0 || policy === undefined) return;
const errorMessages: string[] = [];
conflicts.forEach(conflict => {
const policyForKind = policy[conflict.kind] ?? 'off';
if (policyForKind === 'off') return;
const message = RouteConflictDetector.describeConflict(conflict);
if (policyForKind === 'warn') {
logger.warn(message);
return;
}
errorMessages.push(message);
});
if (errorMessages.length > 0) {
throw new RouteConflictException(errorMessages);
}
}
/**
* Removes shadow conflicts that specificity sorting has already resolved.
*
* When `routeResolutionStrategy: 'specificity'` is active, the sort
* promotes more-specific routes ahead of less-specific ones. A shadow
* where the sort promoted the winner (it was declared *later* but sorted
* *first*) is handled correctly at runtime — the more-specific route is
* registered first and handles its requests while the less-specific routeView on GitHub (pinned to dd75d7bd8c)
When it happens
Trigger: Thrown at packages/core/router/route-conflict-detector.ts:194 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nestjs/nest@dd75d7bd8c (2026-08-21).
Data as JSON: /api/errors/9f07963045a16a03.
Report an issue: GitHub.