You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ...
bug report
feature request
support request
I confirm that I
used the search to make sure that a similar issue hasn't already been submit
Expected Behavior
Current Behavior
It works as expected now but the code is a bit unsafe.
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
The text was updated successfully, but these errors were encountered: