Skip to content

Commit

Permalink
Update packages/core/errors/messages.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Nov 7, 2022
1 parent 4d3f283 commit ee82c7b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/errors/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ export const INVALID_CLASS_SCOPE_MESSAGE = (
name || 'This class'
} is marked as a scoped provider. Request and transient-scoped providers can't be used in combination with "get()" method. Please, use "resolve()" instead.`;

export const UNKNOWN_REQUEST_MAPPING = (metatypeWrongPlaced: Type) => {
const className = metatypeWrongPlaced.name;
export const UNKNOWN_REQUEST_MAPPING = (metatype: Type) => {
const className = metatype.name;
return className
? `An invalid controller has been detected. "${className}" do not have the @Controller() decorator but it is being listed in the controllers array of some module.`
: `An invalid controller has been detected. Perhaps, one of your controllers is missing @Controller() decorator.`;
? `An invalid controller has been detected. "${className}" does not have the @Controller() decorator but it is being listed in the "controllers" array of some module.`
: `An invalid controller has been detected. Perhaps, one of your controllers is missing the @Controller() decorator.`;
};

export const INVALID_MIDDLEWARE_CONFIGURATION = `An invalid middleware configuration has been passed inside the module 'configure()' method.`;
Expand Down

0 comments on commit ee82c7b

Please sign in to comment.