File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,12 @@ import { callEventAudioSounds } from "./CallEventAudioRenderer";
6161import { useLatest } from "../useLatest" ;
6262import { usePageTitle } from "../usePageTitle" ;
6363import { ErrorView } from "../ErrorView" ;
64- import { ConnectionLostError , ElementCallError } from "../utils/errors.ts" ;
64+ import {
65+ ConnectionLostError ,
66+ ElementCallError ,
67+ ErrorCategory ,
68+ ErrorCode ,
69+ } from "../utils/errors.ts" ;
6570import { ElementCallRichError } from "../RichError.tsx" ;
6671
6772declare global {
@@ -179,6 +184,12 @@ export const GroupCallView: FC<Props> = ({
179184 setEnterRTCError ( e ) ;
180185 } else {
181186 logger . error ( `Unknown Error while entering RTC session` , e ) ;
187+ const error = new ElementCallError (
188+ e . message ,
189+ ErrorCode . UNKNOWN_ERROR ,
190+ ErrorCategory . UNKNOWN ,
191+ ) ;
192+ setEnterRTCError ( error ) ;
182193 }
183194 }
184195 } ;
Original file line number Diff line number Diff line change @@ -13,13 +13,14 @@ export enum ErrorCode {
1313 */
1414 MISSING_MATRIX_RTC_FOCUS = "MISSING_MATRIX_RTC_FOCUS" ,
1515 CONNECTION_LOST_ERROR = "CONNECTION_LOST_ERROR" ,
16- // UNKNOWN_ERROR = "UNKNOWN_ERROR",
16+ UNKNOWN_ERROR = "UNKNOWN_ERROR" ,
1717}
1818
1919export enum ErrorCategory {
2020 /** Calling is not supported, server misconfigured (JWT service missing, no MSC support ...)*/
2121 CONFIGURATION_ISSUE = "CONFIGURATION_ISSUE" ,
2222 NETWORK_CONNECTIVITY = "NETWORK_CONNECTIVITY" ,
23+ UNKNOWN = "UNKNOWN" ,
2324 // SYSTEM_FAILURE / FEDERATION_FAILURE ..
2425}
2526
@@ -37,7 +38,7 @@ export class ElementCallError extends Error {
3738 category : ErrorCategory ,
3839 localisedMessage ?: string ,
3940 ) {
40- super ( ) ;
41+ super ( name ) ;
4142 this . localisedMessage = localisedMessage ;
4243 this . category = category ;
4344 this . code = code ;
You can’t perform that action at this time.
0 commit comments