When an error is encountered during submit trigger app error state
The current behavior when an error is hit is to silently fail with no
UI feedback resulting in user confusion around why nothing happened.
Change-Id: I266b3ad271419c3638f99d31a052d70fabde4555
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
index 8ca9128..84c8cee 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js
@@ -756,6 +756,11 @@
return this.send(this._includeComments, this.canBeStarted)
.then(keepReviewers => {
this._purgeReviewersPendingRemove(false, keepReviewers);
+ }).catch(err => {
+ this.dispatchEvent(new CustomEvent('show-error', {
+ bubbles: true,
+ detail: {message: `Error submitting review ${err}`},
+ }));
});
},