Compare commits

...

1 Commits

Author SHA1 Message Date
Matt Miller
974252aa57 fix: silence useImage onError rethrow at every call site
VueUse `useImage` (built on `useAsyncState`) defaults its `onError` to
`globalThis.reportError`. When an `<img>` fires `onerror`, the Promise
rejects with a raw DOM Event and `reportError` dispatches it to
`window`, which Datadog RUM's browser integration logs as an uncaught
error. This has been the top RUM issue on prod-v2 for 30+ days
(~192k events / 3,270 sessions per day).

Pass `onError: () => {}` to every `useImage` call site — the consumers
already surface error state via the returned `error` ref and handle it
in-template, so the rethrow is pure noise.

Fixes FE-224
2026-04-20 17:12:20 -07:00
4 changed files with 21 additions and 10 deletions

View File

@@ -51,5 +51,8 @@ const {
alt?: string
}>()
const { error } = useImage(computed(() => ({ src, alt })))
const { error } = useImage(
computed(() => ({ src, alt })),
{ onError: () => {} }
)
</script>

View File

@@ -184,10 +184,13 @@ const tooltipDelay = computed<number>(() =>
settingStore.get('LiteGraph.Node.TooltipDelay')
)
const { isLoading, error } = useImage({
src: asset.preview_url ?? '',
alt: displayName.value
})
const { isLoading, error } = useImage(
{
src: asset.preview_url ?? '',
alt: displayName.value
},
{ onError: () => {} }
)
function handleSelect() {
acknowledgeAsset(asset.id)

View File

@@ -34,10 +34,13 @@ const emit = defineEmits<{
view: []
}>()
const { state, error, isReady } = useImage({
src: asset.src ?? '',
alt: getAssetDisplayName(asset)
})
const { state, error, isReady } = useImage(
{
src: asset.src ?? '',
alt: getAssetDisplayName(asset)
},
{ onError: () => {} }
)
whenever(
() =>

View File

@@ -63,5 +63,7 @@ const imageOptions = computed(() => ({
src: normalizedPreviewUrl.value ?? ''
}))
const { isReady, isLoading, error } = useImage(imageOptions)
const { isReady, isLoading, error } = useImage(imageOptions, {
onError: () => {}
})
</script>