dxfrontier/cds-ts-dispatcher

[FEATURE] New `@OnError()` decorator

Closed this issue ยท 3 comments

Description

Once a new version of @cap-js/cds-types is released and we get a new srv.on('error') method overload, it would be nice to implement @OnError() handler.

Suggested solution

@UnboundActions()
class UnboundActionsHandler {

  @OnError()
  onError(error: Error, request: Request) {
    // TODO: implement me
  }

}

cds-types v0.2.0 with support for srv.on('error') has been released.

@hakimio Hi Thomas,
All good, you can now implement the new @OnError decorator.

Thank you, Daniel ๐Ÿ™‚