Replace technical & unlocalized error message with "Connection lost"
This commit is contained in:
@@ -58,10 +58,9 @@ import { callEventAudioSounds } from "./CallEventAudioRenderer";
|
|||||||
import { useLatest } from "../useLatest";
|
import { useLatest } from "../useLatest";
|
||||||
import { usePageTitle } from "../usePageTitle";
|
import { usePageTitle } from "../usePageTitle";
|
||||||
import {
|
import {
|
||||||
|
ConnectionLostError,
|
||||||
E2EENotSupportedError,
|
E2EENotSupportedError,
|
||||||
ElementCallError,
|
ElementCallError,
|
||||||
ErrorCode,
|
|
||||||
RTCSessionError,
|
|
||||||
UnknownCallError,
|
UnknownCallError,
|
||||||
} from "../utils/errors.ts";
|
} from "../utils/errors.ts";
|
||||||
import { GroupCallErrorBoundary } from "./GroupCallErrorBoundary.tsx";
|
import { GroupCallErrorBoundary } from "./GroupCallErrorBoundary.tsx";
|
||||||
@@ -142,14 +141,7 @@ export const GroupCallView: FC<Props> = ({
|
|||||||
useTypedEventEmitter(
|
useTypedEventEmitter(
|
||||||
rtcSession,
|
rtcSession,
|
||||||
MatrixRTCSessionEvent.MembershipManagerError,
|
MatrixRTCSessionEvent.MembershipManagerError,
|
||||||
(error) => {
|
(error) => setExternalError(new ConnectionLostError()),
|
||||||
setExternalError(
|
|
||||||
new RTCSessionError(
|
|
||||||
ErrorCode.MEMBERSHIP_MANAGER_UNRECOVERABLE,
|
|
||||||
error.message ?? error,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Sanity check the room object
|
// Sanity check the room object
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ export enum ErrorCode {
|
|||||||
*/
|
*/
|
||||||
MISSING_MATRIX_RTC_FOCUS = "MISSING_MATRIX_RTC_FOCUS",
|
MISSING_MATRIX_RTC_FOCUS = "MISSING_MATRIX_RTC_FOCUS",
|
||||||
CONNECTION_LOST_ERROR = "CONNECTION_LOST_ERROR",
|
CONNECTION_LOST_ERROR = "CONNECTION_LOST_ERROR",
|
||||||
MEMBERSHIP_MANAGER_UNRECOVERABLE = "MEMBERSHIP_MANAGER_UNRECOVERABLE",
|
|
||||||
/** LiveKit indicates that the server has hit its track limits */
|
/** LiveKit indicates that the server has hit its track limits */
|
||||||
INSUFFICIENT_CAPACITY_ERROR = "INSUFFICIENT_CAPACITY_ERROR",
|
INSUFFICIENT_CAPACITY_ERROR = "INSUFFICIENT_CAPACITY_ERROR",
|
||||||
E2EE_NOT_SUPPORTED = "E2EE_NOT_SUPPORTED",
|
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 ...)*/
|
/** Calling is not supported, server misconfigured (JWT service missing, no MSC support ...)*/
|
||||||
CONFIGURATION_ISSUE = "CONFIGURATION_ISSUE",
|
CONFIGURATION_ISSUE = "CONFIGURATION_ISSUE",
|
||||||
NETWORK_CONNECTIVITY = "NETWORK_CONNECTIVITY",
|
NETWORK_CONNECTIVITY = "NETWORK_CONNECTIVITY",
|
||||||
RTC_SESSION_FAILURE = "RTC_SESSION_FAILURE",
|
|
||||||
CLIENT_CONFIGURATION = "CLIENT_CONFIGURATION",
|
CLIENT_CONFIGURATION = "CLIENT_CONFIGURATION",
|
||||||
UNKNOWN = "UNKNOWN",
|
UNKNOWN = "UNKNOWN",
|
||||||
// SYSTEM_FAILURE / FEDERATION_FAILURE ..
|
// 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 {
|
export class E2EENotSupportedError extends ElementCallError {
|
||||||
public constructor() {
|
public constructor() {
|
||||||
super(
|
super(
|
||||||
|
|||||||
Reference in New Issue
Block a user