mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 21:16:42 +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:
parent
c08dea386b
commit
a48059fd8f
@ -318,11 +318,10 @@ export default Ember.Component.extend({
|
|||||||
})
|
})
|
||||||
.catch(data => {
|
.catch(data => {
|
||||||
if (data.jqXHR && data.jqXHR.status === 429) {
|
if (data.jqXHR && data.jqXHR.status === 429) {
|
||||||
const error = data.jqXHR.responseJSON
|
this.set(
|
||||||
? data.jqXHR.responseJSON.errors[0]
|
"rateLimitationString",
|
||||||
: data.jqXHR.responseText;
|
I18n.t("admin.dashboard.too_many_requests")
|
||||||
|
);
|
||||||
this.set("rateLimitationString", error);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
@ -2808,6 +2808,7 @@ en:
|
|||||||
disabled: Disabled
|
disabled: Disabled
|
||||||
timeout_error: Sorry, query is taking too long, please pick a shorter interval
|
timeout_error: Sorry, query is taking too long, please pick a shorter interval
|
||||||
exception_error: Sorry, an error occurred while executing the query
|
exception_error: Sorry, an error occurred while executing the query
|
||||||
|
too_many_requests: You’ve performed this action too many times. Please wait before trying again.
|
||||||
|
|
||||||
reports:
|
reports:
|
||||||
trend_title: "%{percent} change. Currently %{current}, was %{prev} in previous period."
|
trend_title: "%{percent} change. Currently %{current}, was %{prev} in previous period."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user