-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Add errors, messages, and results properties
#506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
errors, messages, and results propertieserrors, messages, and results properties
apis/events.d.ts
Outdated
|
|
||
| messages: {message: string, numericSeverity: levels}[] | ||
|
|
||
| errors: {message: string, stack: string}[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what should be visible in types. There are further properties like numericSeverity, code, target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on what you provide into req.error() as parameters. Try out req.error(code, message, target). For example req.error (400, 'Invalid input', 'some_field').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I have added the fields accordingly, thanks for pointing that out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but @vkozyura should have the say.


Fixes #423
https://cap.cloud.sap/docs/node.js/events#req-notify
https://cap.cloud.sap/docs/node.js/events#req-reply-results