From 03a8c744d03efb0985a795cd09e882799bee48e4 Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Wed, 29 Jul 2026 14:38:38 +0200 Subject: [PATCH] UI: suppress API error toasts during restart (#32265) --- assets/js/api.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/js/api.ts b/assets/js/api.ts index 0b0287725..549675ca8 100644 --- a/assets/js/api.ts +++ b/assets/js/api.ts @@ -1,5 +1,6 @@ import axios, { type AxiosResponse } from "axios"; import { openLoginModal } from "./components/Auth/auth"; +import restart from "./restart"; const { protocol, hostname, port, pathname } = window.location; @@ -29,6 +30,11 @@ const api = axios.create({ }); const errorInterceptor = (error: any) => { + // backend is expected to be unreachable during restart, don't alert + if (restart.restarting) { + return Promise.reject(error); + } + // handle unauthorized errors if (error.response?.status === 401) { openLoginModal();