mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-01 11:32:27 +08:00
Merge pull request #1539 from nextcloud/enh/noid/reload-always
reload in case of undefined response
This commit is contained in:
commit
605f8c87fb
1 changed files with 6 additions and 5 deletions
|
@ -19,12 +19,13 @@
|
||||||
const xhr = e.target;
|
const xhr = e.target;
|
||||||
if (xhr.status === 201) {
|
if (xhr.status === 201) {
|
||||||
window.location.replace(xhr.getResponseHeader('Location'));
|
window.location.replace(xhr.getResponseHeader('Location'));
|
||||||
}
|
} else if (xhr.status === 422) {
|
||||||
if (xhr.status === 422) {
|
|
||||||
showError(xhr.response);
|
showError(xhr.response);
|
||||||
}
|
} else if (xhr.status === 500) {
|
||||||
if (xhr.status === 500) {
|
showError("Server error. Please check the mastercontainer logs for details.");
|
||||||
showError("Server error. Please see the logs for details.");
|
} else {
|
||||||
|
// If the responose is not one of the above, we should reload to show the latest content
|
||||||
|
window.location.reload(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue