apply sentry suggestion

This commit is contained in:
ved015 2026-04-06 14:06:25 +05:30
parent 7ddbfe6dd9
commit def4baf028

View file

@ -97,6 +97,9 @@ function fetchOgData(url: string): Promise<OgData | null> {
})
.then((data) => {
const result: OgData = { title: data?.title, image: data?.image }
if (!result.title && !result.image) {
throw new Error("Empty metadata")
}
ogCache.set(url, result)
ogInflight.delete(url)
ogFailures.delete(url)