The Promise you get from submitBatch Throws an error if its not succesful. You have to pass it a second function where you handle the error.
oModel.submitBatch("cmpchange").then(
function (oEvent) {
let messages = this.oContext.getBoundContext().getMessages();
if (messages.length > 0) {
let oJSONModel = new JSONModel();
oJSONModel.setData(messages);
this.oMessageView.setModel(oJSONModel);
this.oMessageDialog.open();
}
},
function (oError) {
// here you get the error in oError
}
)
.bind(this);