From ef40845b54ee2c65568748d28d9d58d7899c7ac8 Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 28 Jun 2025 22:44:34 +0800 Subject: [PATCH] feat: wrap blurhash rendering in ErrorBoundary for improved error handling Signed-off-by: Innei --- .../src/components/ui/media/Media.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/desktop/layer/renderer/src/components/ui/media/Media.tsx b/apps/desktop/layer/renderer/src/components/ui/media/Media.tsx index 385c5adb2..583c76c83 100644 --- a/apps/desktop/layer/renderer/src/components/ui/media/Media.tsx +++ b/apps/desktop/layer/renderer/src/components/ui/media/Media.tsx @@ -1,6 +1,7 @@ import { nextFrame } from "@follow/utils/dom" import { getImageProxyUrl } from "@follow/utils/img-proxy" import { cn } from "@follow/utils/utils" +import { ErrorBoundary } from "@sentry/react" import { useForceUpdate } from "motion/react" import type { FC, ImgHTMLAttributes, VideoHTMLAttributes } from "react" import * as React from "react" @@ -343,14 +344,16 @@ const MediaImpl: FC = ({ }} > {props.blurhash && ( - - - + + + + + )}