From 86aa459a84d1ecc33b0c7df2fa133ee7a8d590b3 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 12 Jun 2025 23:47:33 -0400 Subject: [PATCH 1/5] Center the heading on the error screen --- src/ErrorView.module.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ErrorView.module.css b/src/ErrorView.module.css index 14c5f141..bd68f5e3 100644 --- a/src/ErrorView.module.css +++ b/src/ErrorView.module.css @@ -12,6 +12,7 @@ .error > h1 { margin: 0; + text-align: center; } .error > p { From 764c6fce24ac3933a4311dfd888ea2e4b7c553cb Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 12 Jun 2025 23:54:40 -0400 Subject: [PATCH 2/5] Fix missing text on "Call not found" screen --- locales/en/app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en/app.json b/locales/en/app.json index e8a86fcc..480bd0bd 100644 --- a/locales/en/app.json +++ b/locales/en/app.json @@ -82,7 +82,7 @@ "error": { "call_is_not_supported": "Call is not supported", "call_not_found": "Call not found", - "call_not_found_description": "<0>That link doesn't appear to belong to any existing call. Check that you have the right link, or <1>create a new one.", + "call_not_found_description": "<0>That link doesn't appear to belong to any existing call. Check that you have the right link, or <2>create a new one.", "connection_lost": "Connection lost", "connection_lost_description": "You were disconnected from the call.", "e2ee_unsupported": "Incompatible browser", From 31c35583fb1932b0e3a5422c0d1c39fd5f5ad5a6 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 13 Jun 2025 00:04:13 -0400 Subject: [PATCH 3/5] Replace technical & unlocalized error message with "Connection lost" --- src/room/GroupCallView.tsx | 12 ++---------- src/utils/errors.ts | 7 ------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 831cf84f..d99e1931 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -58,10 +58,9 @@ import { callEventAudioSounds } from "./CallEventAudioRenderer"; import { useLatest } from "../useLatest"; import { usePageTitle } from "../usePageTitle"; import { + ConnectionLostError, E2EENotSupportedError, ElementCallError, - ErrorCode, - RTCSessionError, UnknownCallError, } from "../utils/errors.ts"; import { GroupCallErrorBoundary } from "./GroupCallErrorBoundary.tsx"; @@ -142,14 +141,7 @@ export const GroupCallView: FC = ({ useTypedEventEmitter( rtcSession, MatrixRTCSessionEvent.MembershipManagerError, - (error) => { - setExternalError( - new RTCSessionError( - ErrorCode.MEMBERSHIP_MANAGER_UNRECOVERABLE, - error.message ?? error, - ), - ); - }, + (error) => setExternalError(new ConnectionLostError()), ); useEffect(() => { // Sanity check the room object diff --git a/src/utils/errors.ts b/src/utils/errors.ts index a3df68d0..e8adbca1 100644 --- a/src/utils/errors.ts +++ b/src/utils/errors.ts @@ -13,7 +13,6 @@ export enum ErrorCode { */ MISSING_MATRIX_RTC_FOCUS = "MISSING_MATRIX_RTC_FOCUS", CONNECTION_LOST_ERROR = "CONNECTION_LOST_ERROR", - MEMBERSHIP_MANAGER_UNRECOVERABLE = "MEMBERSHIP_MANAGER_UNRECOVERABLE", /** LiveKit indicates that the server has hit its track limits */ INSUFFICIENT_CAPACITY_ERROR = "INSUFFICIENT_CAPACITY_ERROR", E2EE_NOT_SUPPORTED = "E2EE_NOT_SUPPORTED", @@ -25,7 +24,6 @@ export enum ErrorCategory { /** Calling is not supported, server misconfigured (JWT service missing, no MSC support ...)*/ CONFIGURATION_ISSUE = "CONFIGURATION_ISSUE", NETWORK_CONNECTIVITY = "NETWORK_CONNECTIVITY", - RTC_SESSION_FAILURE = "RTC_SESSION_FAILURE", CLIENT_CONFIGURATION = "CLIENT_CONFIGURATION", UNKNOWN = "UNKNOWN", // SYSTEM_FAILURE / FEDERATION_FAILURE .. @@ -84,11 +82,6 @@ export class ConnectionLostError extends ElementCallError { } } -export class RTCSessionError extends ElementCallError { - public constructor(code: ErrorCode, message: string) { - super("RTCSession Error", code, ErrorCategory.RTC_SESSION_FAILURE, message); - } -} export class E2EENotSupportedError extends ElementCallError { public constructor() { super( From 905177f0b664d88efe8ed4bca9cbb120962d9a4b Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 13 Jun 2025 00:09:33 -0400 Subject: [PATCH 4/5] Don't present internal error messages as if they are localized --- src/utils/errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/errors.ts b/src/utils/errors.ts index e8adbca1..674cfdec 100644 --- a/src/utils/errors.ts +++ b/src/utils/errors.ts @@ -99,7 +99,7 @@ export class UnknownCallError extends ElementCallError { t("error.generic"), ErrorCode.UNKNOWN_ERROR, ErrorCategory.UNKNOWN, - error.message, + undefined, // Properly set it as a cause for a better reporting on sentry error, ); From a36e72147cd158af9e6d0d8f1a3f10d5576ccda3 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 16 Jun 2025 16:48:13 -0400 Subject: [PATCH 5/5] Hide error screen icon from accessibility technologies It does not have any meaningful accessible label to contribute beyond what is already stated in the heading. --- src/ErrorView.tsx | 2 +- .../__snapshots__/GroupCallErrorBoundary.test.tsx.snap | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ErrorView.tsx b/src/ErrorView.tsx index ed4103c5..1309ae04 100644 --- a/src/ErrorView.tsx +++ b/src/ErrorView.tsx @@ -99,7 +99,7 @@ export const ErrorView: FC = ({ return (
- + {title} diff --git a/src/room/__snapshots__/GroupCallErrorBoundary.test.tsx.snap b/src/room/__snapshots__/GroupCallErrorBoundary.test.tsx.snap index 6fd1ab40..79eb580b 100644 --- a/src/room/__snapshots__/GroupCallErrorBoundary.test.tsx.snap +++ b/src/room/__snapshots__/GroupCallErrorBoundary.test.tsx.snap @@ -112,6 +112,7 @@ exports[`ConnectionLostError: Action handling should reset error state 1`] = ` data-size="large" >