From 34b772575e2f7316e383f1e09b66431caaed73b2 Mon Sep 17 00:00:00 2001 From: romanrizzi Date: Thu, 25 Apr 2019 14:49:52 -0300 Subject: [PATCH] FIX: Return 'failed' attribute when catching an ajax error and the attribute is present --- app/assets/javascripts/discourse/lib/ajax-error.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/ajax-error.js.es6 b/app/assets/javascripts/discourse/lib/ajax-error.js.es6 index 8e7366d3c52..5cc5464e54d 100644 --- a/app/assets/javascripts/discourse/lib/ajax-error.js.es6 +++ b/app/assets/javascripts/discourse/lib/ajax-error.js.es6 @@ -35,7 +35,7 @@ export function extractError(error, defaultMessage) { } else if (parsedJSON.error) { parsedError = parsedJSON.error; } else if (parsedJSON.failed) { - parsedError = parsedJSON.message; + parsedError = parsedJSON.failed; } }