diff --git a/src/loaders/routes.loader.ts b/src/loaders/routes.loader.ts index da62093b..eae10091 100644 --- a/src/loaders/routes.loader.ts +++ b/src/loaders/routes.loader.ts @@ -27,12 +27,7 @@ function registerRoute(app: Express, route: RoutesInjectionRouterConfiguration): path, handlers.map(handler => { return async (req: MedusaAuthenticatedRequest | Request, res: Response, next: NextFunction) => { - try { - await handler(req, res); - return next(); - } catch (e) { - return next(e); - } + await handler(req, res, next); }; }) );