mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 23:27:46 +08:00
FIX: uses localized string for 429 in reports (#6302)
NGINX was retuning an html page instead of single string for some users. Seems safer to not risk showing anything from server anyways.
This commit is contained in:
@ -318,11 +318,10 @@ export default Ember.Component.extend({
|
||||
})
|
||||
.catch(data => {
|
||||
if (data.jqXHR && data.jqXHR.status === 429) {
|
||||
const error = data.jqXHR.responseJSON
|
||||
? data.jqXHR.responseJSON.errors[0]
|
||||
: data.jqXHR.responseText;
|
||||
|
||||
this.set("rateLimitationString", error);
|
||||
this.set(
|
||||
"rateLimitationString",
|
||||
I18n.t("admin.dashboard.too_many_requests")
|
||||
);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
|
Reference in New Issue
Block a user