-
Notifications
You must be signed in to change notification settings - Fork 99
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
Node.js - Error Sanitisation & OData V4 Server Messages for Confirmation Popups in Fiori Elements #436
Comments
Hi @sebastianesch, I feel that the sanitization is a bit too strict here. We'll double check :) Best regards, |
HI @sebastianesch, after additional reading of https://ui5.sap.com/#/topic/fbe1cb5613cf4a40a841750bf813238e section Messages in error responses
If I read that correctly, the Best, |
Hi @johannes-vogel, the section of the UI5 documentations above your quote states:
For the confirmation use case, we report an HTTP Status Code 412, means we are in case 1 and I need the Looking at
all the UI5 properties are there, but there is a distinction between allowed properties and additional properties - which would be useful to propagate to SAPUI5 applications. After the error is handled in the in the Common Error module, it seems to be processed later again, but I have not figured out when and by which handler. Kind regards, |
Notes: In the OData v4 error response documentation, there's no mention of the I can check with the Fiori Elements/UI5 colleagues. |
Hello @sebastianesch ! I cannot comment on CAP, but I am the team architect for UI5's Which issues do you experience with the confirmation use case? Maybe "Strict Handling" on https://openui5.hana.ondemand.com/topic/b54f7895b7594c61a83fa7257fa9d13f helps? Best regards, |
HI @David-Kunz @ThomasChadzelek, I have created an example at https://github.com/sebastianesch/sap-cap-examples/tree/master/412-confirmation-dialog. At the moment, if I reply in CAP with an 412 error, the Fiori Elements application treats the response as an error and does not show a confirmation dialog. (See repo for a screenshot) Looking at the UI5 documentation Confirmation Popup for Actions that Fail with 412 Warnings, it states:
At the bottom of the page (for OData V4) is stated:
That's why I figured, that the response needs the @David-Kunz I'm aware that the OData V4 spec does not describe the Kind regards, |
"if I reply in CAP with an 412 error, the Fiori Elements application treats the response as an error" |
@ThomasChadzelek I don't do that. I haven't seen this in the documentation anywhere. I'll try that. Adding the header to the response results in the Fiori App staying in the busy state: |
Hmm, the response now looks as expected, as far as I can tell. Maybe you can share the full response as text here. Are there any errors on console, apart from that "busy lock"? |
The response from the network tab in Chrome is:
When I delete the console before executing the action, I don't get any output in the Chrome Console immediately. After 30 seconds I get:
|
OK, our docs are for sure never precise enough ;-) The response is insufficient. I cannot exactly explain how it leads to the issue you observe, but I can explain what is missing. When an action fails due to "strict handling", it means that the action would have succeeded without strict handling, but that warnings occured which have been escalated, so to say, to become errors instead (that's the core of strict handling). This means that the error response needs to contain an error object (check) with all these warnings as details - this is missing. Here is an example of such details from our integration test (lines 47920ff.):
|
Hi @333sachin , |
Hi,
I'm trying to get OData V4 Server messages to work https://ui5.sap.com/#/topic/fbe1cb5613cf4a40a841750bf813238e to get Confirmation Dialogs in my Fiori Elements applications (see https://ui5.sap.com/#/topic/9a536627a6a94de084b0605eb164d2c8), but it seems as CAP does not allow all properties SAPUI5 supports, but only the ones from the OData standard. Unfortunately SAPUI5 cannot work with "@transition" but expects "transition", which is sanitised by CAP.
It would make sense to state here
docs/node.js/events.md
Line 429 in 7ec8723
Kind regards,
Sebastian
The text was updated successfully, but these errors were encountered: