lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.48k stars 498 forks source link

Await apiHandler to handle error in try/catch #1602

Closed VincentClair closed 6 months ago

VincentClair commented 6 months ago

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 :

VincentClair commented 6 months ago

Hello @WoH @jackey8616, How can i help to validate this PR ? Is there something missing ?

denizdogan commented 5 months ago

When can we expect a new release with this fix included? Much appreciated