Skip to content

Commit f8a5de6

Browse files
committed
review: rename ec-error file to error
1 parent 4701e41 commit f8a5de6

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

src/RichError.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515

1616
import type { ComponentType, FC, ReactNode, SVGAttributes } from "react";
1717
import { ErrorView } from "./ErrorView";
18-
import { type ElementCallError, ErrorCategory } from "./utils/ec-errors.ts";
18+
import { type ElementCallError, ErrorCategory } from "./utils/errors.ts";
1919

2020
/**
2121
* An error consisting of a terse message to be logged to the console and a
@@ -96,9 +96,7 @@ const GenericECError: FC<{ error: ElementCallError }> = ({
9696
return (
9797
<ErrorView Icon={icon} title={title}>
9898
<p>
99-
{error.localisedMessage ? (
100-
error.localisedMessage
101-
) : (
99+
{error.localisedMessage ?? (
102100
<Trans
103101
i18nKey="error.unexpected_ec_error"
104102
components={[<b />, <code />]}

src/room/GroupCallView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import { callEventAudioSounds } from "./CallEventAudioRenderer";
6161
import { useLatest } from "../useLatest";
6262
import { usePageTitle } from "../usePageTitle";
6363
import { ErrorView } from "../ErrorView";
64-
import { ConnectionLostError, ElementCallError } from "../utils/ec-errors.ts";
64+
import { ConnectionLostError, ElementCallError } from "../utils/errors.ts";
6565
import { ElementCallRichError } from "../RichError.tsx";
6666

6767
declare global {

src/room/InCallView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import {
9797
useSetting,
9898
} from "../settings/settings";
9999
import { ReactionsReader } from "../reactions/ReactionsReader";
100-
import { ConnectionLostError } from "../utils/ec-errors.ts";
100+
import { ConnectionLostError } from "../utils/errors.ts";
101101

102102
const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {});
103103

src/rtcSessionHelpers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import EventEmitter from "events";
1313
import { enterRTCSession, leaveRTCSession } from "../src/rtcSessionHelpers";
1414
import { mockConfig } from "./utils/test";
1515
import { ElementWidgetActions, widget } from "./widget";
16-
import { ErrorCode } from "./utils/ec-errors.ts";
16+
import { ErrorCode } from "./utils/errors.ts";
1717

1818
const actualWidget = await vi.hoisted(async () => vi.importActual("./widget"));
1919
vi.mock("./widget", () => ({

src/rtcSessionHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
1818
import { PosthogAnalytics } from "./analytics/PosthogAnalytics";
1919
import { Config } from "./config/Config";
2020
import { ElementWidgetActions, widget, type WidgetHelpers } from "./widget";
21-
import { MatrixRTCFocusMissingError } from "./utils/ec-errors.ts";
21+
import { MatrixRTCFocusMissingError } from "./utils/errors.ts";
2222

2323
const FOCI_WK_KEY = "org.matrix.msc4143.rtc_foci";
2424

src/utils/ec-errors.ts renamed to src/utils/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export enum ErrorCode {
1717
}
1818

1919
export enum ErrorCategory {
20-
/** Calling is not supported, server miss-configured (JWT service missing, no MSC support ...)*/
20+
/** Calling is not supported, server misconfigured (JWT service missing, no MSC support ...)*/
2121
CONFIGURATION_ISSUE = "CONFIGURATION_ISSUE",
2222
NETWORK_CONNECTIVITY = "NETWORK_CONNECTIVITY",
2323
// SYSTEM_FAILURE / FEDERATION_FAILURE ..

0 commit comments

Comments
 (0)