-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Bug]: Error Message popup not showing in OdataV2 in FE scenario #415
Comments
Sorry, i was not able to recreate it. Can you check if there are information in row 83? |
SAP UI version: 1.96 I don't get in Line 83:
This is because I get a success on line 73 and not an error on line 76 |
Fixed it temporary with this little "hack" openSpreadsheetUploadDialog: async function (oEvent) {
this.getView().setBusyIndicatorDelay(0)
this.getView().setBusy(true)
this.spreadsheetUpload = await this.getView().getController().getOwnerComponent().createComponent({
usage: "spreadsheetImporter",
async: true,
componentData: {
context: this,
tableId:"comxxxxx.tagmanager::sap.suite.ui.generic.template.ListReport.view.ListReport::ZTG_C_TAG_M--responsiveTable-CONDITION",
mandatoryFields: ["TagId", "CompanyCode","ObjectTypeId"],
showBackendErrorMessages: true,
debug: true
}
});
this.spreadsheetUpload.openSpreadsheetUploadDialog()
this.spreadsheetUpload.attachRequestCompleted((event) => {
if(!event.getParameter("success")){
if(sap.ui.getCore().getMessageManager().getMessageModel().oData){
event.getSource().spreadsheetUpload.getODataHandler().odataMessageHandler.displayMessages();
}
}
}, this);
this.getView().setBusy(false)
}`
This part is where the magic happens
`this.spreadsheetUpload.attachRequestCompleted((event) => {
if(!event.getParameter("success")){
if(sap.ui.getCore().getMessageManager().getMessageModel().oData){
event.getSource().spreadsheetUpload.getODataHandler().odataMessageHandler.displayMessages();
}
}
}, this); |
Was able to recreate in on Version It will throw and error when waiting for the create Promises here and called here in A solution would be to try/catch the Triggering the 400 in CAP: init() {
const { "Orders.Items": OrderItems } = this.entities;
this.before('CREATE', OrderItems, (req) => {
// Implement your validation logic here
// For example, check if a required field is missing
// Throw a 400 Bad Request error if validation fails
req.error(400, 'Some important field is missing');
});
return super.init();
} |
Hi @jeremycoppey |
OData Version
OData V2
Draft
No
Scenario
Fiori elements, List Report
UI5 Spreadsheet Component
29
What happened?
In case of a odata 400 Bad Request response in our Batch (this is a 202) we don't get the messagehandler displayed.
While debugging we do not enter the following piece of code (ODataV2-dbg.js file function checkForErrors line 42):
Line 44 returns false as this.submitChangesResponse is empty
So we never get to check the firstResponse nor the showBackendErrorMessages to display the Messages dialog
Relevant log output
Spreadsheet Component Init
Manifest
The text was updated successfully, but these errors were encountered: