deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.19k stars 122 forks source link

Parameter resolver error handling #440

Closed fergusean closed 1 year ago

fergusean commented 1 year ago

Issues thrown during parameter resolution are always shown as Internal error. If the error inherits from HttpError, the error should be handled the same way it would had it been thrown from a controller.

marcj commented 1 year ago

Note: we need the same code as here https://github.com/deepkit/deepkit-framework/blob/98fa1ab2eab05282b5f8c8b2386a5c214fe4c553/packages/http/src/kernel.ts#L56-L60 in these if-else blocks https://github.com/deepkit/deepkit-framework/blob/98fa1ab2eab05282b5f8c8b2386a5c214fe4c553/packages/http/src/http.ts#L736-L755 (we have the right code already in onControllerError, but not in onParametersFailed)