Skip to content

Commit

Permalink
add warning if route is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Boegie19 committed Oct 12, 2023
1 parent 808efd3 commit 7b32656
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ function injectMiddlewares(strapi, strategy) {
);

// If the route exists lets inject the middleware
if (indexID > -1) {
if (indexID === -1) {
debug(
'[WARNING] route "[%s] %s" not registered in strapi, ignoring...',
cacheRoute.method,
cacheRoute.path
);
} else {
switch (strapiRoutes[indexID].method) {
case 'DELETE':
case 'PUT':
Expand Down

0 comments on commit 7b32656

Please sign in to comment.