mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore: update error message
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Logger } from '@nestjs/common';
|
||||
|
||||
const UNSUPPORTED_PATH_MESSAGE = (text: TemplateStringsArray, route: string) =>
|
||||
`Unsupported route path: "${route}". In previous versions, the symbols ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/*path. For more details, refer to the migration guide.`;
|
||||
`Unsupported route path: "${route}". In previous versions, the symbols ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/{*path}. For more details, refer to the migration guide.`;
|
||||
|
||||
export class LegacyRouteConverter {
|
||||
private static readonly logger = new Logger(LegacyRouteConverter.name);
|
||||
|
||||
@@ -279,7 +279,7 @@ export class RouterExplorer {
|
||||
} catch (e) {
|
||||
if (e instanceof TypeError) {
|
||||
this.logger.error(
|
||||
`Unsupported host "${host}" syntax. In past releases, ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/*path. Please see the migration guide for more information.`,
|
||||
`Unsupported host "${host}" syntax. In past releases, ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/{*path}. Please see the migration guide for more information.`,
|
||||
);
|
||||
}
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user