[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] Have you written unit tests?
[x] Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
[x] This PR is associated with an existing issue?
Closing issues
closes #1598
Test plan
Checks that a controller method without async keyword throwing an error is caught.
The real problem is if method is not a promise (async keyword), and error throw immediately when building promise, server is no more responding, and we get a time out (actually 5sec in tests).
All Submissions:
Closing issues
closes #1598
Test plan
Checks that a controller method without
async
keyword throwing an error is caught.The real problem is if method is not a promise (
async
keyword), and error throw immediately when building promise, server is no more responding, and we get a time out (actually 5sec in tests).The problem could resolve in two ways :
buildPromise
int the try/catch https://github.com/lukeautry/tsoa/blob/efdb468a5cedcb9bef345f1eed776e8fc621b443/packages/runtime/src/routeGeneration/templates/express/expressTemplateService.ts#L41apiHandler
to be resolved on generated template https://github.com/lukeautry/tsoa/blob/efdb468a5cedcb9bef345f1eed776e8fc621b443/packages/cli/src/routeGeneration/templates/express.hbs#L106 I have chosen to apply both, as I think code will be more robust.