diff --git a/src/decorators/Controller.ts b/src/decorators/Controller.ts index e277ca2..0fa9a0b 100644 --- a/src/decorators/Controller.ts +++ b/src/decorators/Controller.ts @@ -85,7 +85,12 @@ export function Controller() try { await Promise.all([fn.bind(controller)(req, res, next)]) - .catch((error) => { throw new Error(error) }); + .catch((error) => { + console.log('[Controller.setup.] Error in promise:', error); + throw new Error(error); + }); + + console.log('[Controller.setup.] Successfully executed GET method:', method); } catch(error) { console.log('[Controller.setup.] Error:', error); @@ -101,6 +106,8 @@ export function Controller() return Promise.reject(error); } } + + console.log('[Controller.setup.] Finished processing GET request for method:', method); }); });