diff --git a/resources/js/tasks/edit.js b/resources/js/tasks/edit.js index 0b288940e7..a7e6ccd7d5 100644 --- a/resources/js/tasks/edit.js +++ b/resources/js/tasks/edit.js @@ -437,7 +437,11 @@ const main = new Vue({ ); this.draftTask = structuredClone(response.data); }) - .catch(() => { + .catch((error) => { + if (error?.response?.status === 401) { + window.location = "/login"; + return; + } this.errorAutosave = true; }) .finally(() => {