Closed davidsaslawsky-trackinsight closed 8 months ago
Hello there davidsaslawsky-trackinsight š
Thank you for opening your very first issue in this project.
We will try to get back to you as soon as we can.š
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
promiseHandler() returns a promise and should have either an await or a return here: https://github.com/lukeautry/tsoa/blob/master/packages/cli/src/routeGeneration/templates/express.hbs#L103C15-L103C29
The other templates (koa, hapi) are fine. I think it works on Express because it relies on the methods on the response object rather than on the end of the async handler.
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
Current Behavior
It works as expected now but the code is a bit unsafe.
Possible Solution
or maybe replace
promiseHandler()
by an await on the controller method: there's the try / catch block calling next(err) anyway.Context (Environment)
Version of the library: 5.1.1 Version of NodeJS: Node 18