Merge pull request #1539 from nextcloud/enh/noid/reload-always

reload in case of undefined response
This commit is contained in:
Simon L 2022-12-17 15:27:45 +01:00 committed by GitHub
commit 605f8c87fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
} }
} }