Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Improve connectivity error message

Gabe Kangas53bc18bb19f4
diff --git a/web/components/stores/ClientConfigStore.tsx b/web/components/stores/ClientConfigStore.tsx
index e4cb192c3d..488d4b09cd 100644
--- a/web/components/stores/ClientConfigStore.tsx
+++ b/web/components/stores/ClientConfigStore.tsx
@@ -35,6 +35,8 @@ const ACCESS_TOKEN_KEY = 'accessToken';
let serverStatusRefreshPoll: ReturnType<typeof setInterval>;
let hasBeenModeratorNotified = false;
+const serverConnectivityError = `Cannot connect to the Owncast service. Please check your internet connection or if needed, double check this Owncast server is running.`;
+
// Server status is what gets updated such as viewer count, durations,
// stream title, online/offline state, etc.
export const serverStatusState = atom<ServerStatus>({
@@ -200,10 +202,7 @@ export const ClientConfigStore: FC = () => {
setGlobalFatalErrorMessage(null);
setHasLoadedConfig(true);
} catch (error) {
- setGlobalFatalError(
- 'Unable to reach Owncast server',
- `Owncast cannot launch. Please make sure the Owncast server is running.`,
- );
+ setGlobalFatalError('Unable to reach Owncast server', serverConnectivityError);
console.error(`ClientConfigService -> getConfig() ERROR: \n${error}`);
}
};
@@ -221,10 +220,7 @@ export const ClientConfigStore: FC = () => {
setGlobalFatalErrorMessage(null);
} catch (error) {
sendEvent(AppStateEvent.Fail);
- setGlobalFatalError(
- 'Unable to reach Owncast server',
- `Owncast cannot launch. Please make sure the Owncast server is running.`,
- );
+ setGlobalFatalError('Unable to reach Owncast server', serverConnectivityError);
console.error(`serverStatusState -> getStatus() ERROR: \n${error}`);
}
};