mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 12:23:36 +08:00
Add HTTP error codes to ajax-error
This commit is contained in:
parent
951d6ac28f
commit
05010b6b33
|
@ -36,6 +36,12 @@ function extractError(error) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!parsedError) {
|
||||
if (error.status && error.status >= 400) {
|
||||
parsedError = error.status + " " + error.statusText;
|
||||
}
|
||||
}
|
||||
|
||||
return parsedError || I18n.t('generic_error');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user