From 77a1d8675c6992ecc07d9444a5b3701dd752c00f Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 30 Nov 2021 11:54:38 +0100 Subject: [PATCH] FIX: adds 422 status code to bootstrap json (#15138) A post error validation would return a 422 status code. This status code was not accepted with the recent changes to bootstrap-json/index.js and would return a "Discourse Build Error" string, preventing any kind of bootbox popup error in the composer. --- app/assets/javascripts/discourse/lib/bootstrap-json/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js index 1685d5328ec..ece7a60629d 100644 --- a/app/assets/javascripts/discourse/lib/bootstrap-json/index.js +++ b/app/assets/javascripts/discourse/lib/bootstrap-json/index.js @@ -240,6 +240,7 @@ async function handleRequest(proxy, baseURL, req, res) { 308, 404, 403, + 422, 500, ]; const proxyRequest = bent(req.method, acceptedStatusCodes);