Skip to content

A platform for community discussion. Free, open, simple.

FIX: Return 'failed' attribute when catching an ajax error and the attribute is present

romanrizzi34b772575e2f
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;
}
}