mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-01 21:25:18 +00:00
actually log error boundaries fully
This commit is contained in:
@@ -54,9 +54,11 @@ const ErrorPage: FC<ErrorPageProps> = ({
|
|||||||
widget,
|
widget,
|
||||||
}: ErrorPageProps): ReactElement => {
|
}: ErrorPageProps): ReactElement => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const cause = error?.cause;
|
||||||
logger.error(
|
logger.error(
|
||||||
`Error boundary caught: name=${error?.name} message=${error?.message} category=${error?.category}`,
|
`Error boundary caught: name=${error?.name} message=${error?.message} category=${error?.category}`,
|
||||||
error,
|
error,
|
||||||
|
...(cause ? ["caused by:", cause] : []),
|
||||||
);
|
);
|
||||||
let icon: ComponentType<SVGAttributes<SVGElement>>;
|
let icon: ComponentType<SVGAttributes<SVGElement>>;
|
||||||
switch (error.category) {
|
switch (error.category) {
|
||||||
@@ -131,7 +133,9 @@ export const GroupCallErrorBoundary = ({
|
|||||||
const callError =
|
const callError =
|
||||||
error instanceof ElementCallError
|
error instanceof ElementCallError
|
||||||
? error
|
? error
|
||||||
: new UnknownCallError(error instanceof Error ? error : new Error());
|
: new UnknownCallError(
|
||||||
|
error instanceof Error ? error : new Error(String(error)),
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<ErrorPage
|
<ErrorPage
|
||||||
widget={widget ?? null}
|
widget={widget ?? null}
|
||||||
|
|||||||
Reference in New Issue
Block a user