diff --git a/app/assets/javascripts/discourse/app/models/badge.js b/app/assets/javascripts/discourse/app/models/badge.js index 9c249f89c54..340e25e8308 100644 --- a/app/assets/javascripts/discourse/app/models/badge.js +++ b/app/assets/javascripts/discourse/app/models/badge.js @@ -45,14 +45,10 @@ const Badge = RestModel.extend({ type = "PUT"; } - return ajax(url, { type, data }) - .then((json) => { - this.updateFromJson(json); - return this; - }) - .catch((error) => { - throw new Error(error); - }); + return ajax(url, { type, data }).then((json) => { + this.updateFromJson(json); + return this; + }); }, destroy() {