MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / handleLoadingError

Function handleLoadingError

frontend/src/main.ts:6–14  ·  view source on GitHub ↗
(error: any)

Source from the content-addressed store, hash-verified

4import { setAppLoadingError, setLoadingTitle } from "./tools/dom";
5
6function handleLoadingError(error: any) {
7 console.error("Init app error:", error);
8 const errorMessage = String(error?.message || error);
9 if (errorMessage.toLowerCase().includes("request failed with status code 500")) {
10 setAppLoadingError("The backend is currently unavailable, please try again later.");
11 return;
12 }
13 setAppLoadingError(errorMessage);
14}
15
16async function initApp() {
17 try {

Callers 1

initAppFunction · 0.85

Calls 2

setAppLoadingErrorFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected