From 80bd971420e71b185baae6fb00cae8ed79f4f4ab Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 27 May 2022 10:39:29 +0100 Subject: [PATCH] UX: Show message if rebake fails (#16925) Previously, errors would only be displayed in the developer console. --- app/assets/javascripts/discourse/app/models/post.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/models/post.js b/app/assets/javascripts/discourse/app/models/post.js index a0033455561..25a8f401686 100644 --- a/app/assets/javascripts/discourse/app/models/post.js +++ b/app/assets/javascripts/discourse/app/models/post.js @@ -300,7 +300,9 @@ const Post = RestModel.extend({ }, rebake() { - return ajax(`/posts/${this.id}/rebake`, { type: "PUT" }); + return ajax(`/posts/${this.id}/rebake`, { type: "PUT" }).catch( + popupAjaxError + ); }, unhide() {