review: rename ec-error file to error

This commit is contained in:
Valere
2025-02-28 12:04:49 +01:00
parent 4701e413fd
commit f8a5de604f
6 changed files with 7 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ import {
import type { ComponentType, FC, ReactNode, SVGAttributes } from "react";
import { ErrorView } from "./ErrorView";
import { type ElementCallError, ErrorCategory } from "./utils/ec-errors.ts";
import { type ElementCallError, ErrorCategory } from "./utils/errors.ts";
/**
* An error consisting of a terse message to be logged to the console and a
@@ -96,9 +96,7 @@ const GenericECError: FC<{ error: ElementCallError }> = ({
return (
<ErrorView Icon={icon} title={title}>
<p>
{error.localisedMessage ? (
error.localisedMessage
) : (
{error.localisedMessage ?? (
<Trans
i18nKey="error.unexpected_ec_error"
components={[<b />, <code />]}

View File

@@ -61,7 +61,7 @@ import { callEventAudioSounds } from "./CallEventAudioRenderer";
import { useLatest } from "../useLatest";
import { usePageTitle } from "../usePageTitle";
import { ErrorView } from "../ErrorView";
import { ConnectionLostError, ElementCallError } from "../utils/ec-errors.ts";
import { ConnectionLostError, ElementCallError } from "../utils/errors.ts";
import { ElementCallRichError } from "../RichError.tsx";
declare global {

View File

@@ -97,7 +97,7 @@ import {
useSetting,
} from "../settings/settings";
import { ReactionsReader } from "../reactions/ReactionsReader";
import { ConnectionLostError } from "../utils/ec-errors.ts";
import { ConnectionLostError } from "../utils/errors.ts";
const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {});

View File

@@ -13,7 +13,7 @@ import EventEmitter from "events";
import { enterRTCSession, leaveRTCSession } from "../src/rtcSessionHelpers";
import { mockConfig } from "./utils/test";
import { ElementWidgetActions, widget } from "./widget";
import { ErrorCode } from "./utils/ec-errors.ts";
import { ErrorCode } from "./utils/errors.ts";
const actualWidget = await vi.hoisted(async () => vi.importActual("./widget"));
vi.mock("./widget", () => ({

View File

@@ -18,7 +18,7 @@ import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
import { PosthogAnalytics } from "./analytics/PosthogAnalytics";
import { Config } from "./config/Config";
import { ElementWidgetActions, widget, type WidgetHelpers } from "./widget";
import { MatrixRTCFocusMissingError } from "./utils/ec-errors.ts";
import { MatrixRTCFocusMissingError } from "./utils/errors.ts";
const FOCI_WK_KEY = "org.matrix.msc4143.rtc_foci";

View File

@@ -17,7 +17,7 @@ export enum ErrorCode {
}
export enum ErrorCategory {
/** Calling is not supported, server miss-configured (JWT service missing, no MSC support ...)*/
/** Calling is not supported, server misconfigured (JWT service missing, no MSC support ...)*/
CONFIGURATION_ISSUE = "CONFIGURATION_ISSUE",
NETWORK_CONNECTIVITY = "NETWORK_CONNECTIVITY",
// SYSTEM_FAILURE / FEDERATION_FAILURE ..