{"record":{"id":"f7b9ff2e5a687dce","repo":"toeverything/AFFiNE","slug":"failed-to-fetch-oembed-data-response-status","errorCode":null,"errorMessage":"Failed to fetch oEmbed data: ${response.status} ${response.statusText}","messagePattern":"Failed to fetch oEmbed data: (.+?) (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"blocksuite/affine/shared/src/services/embed-iframe/embed-iframe-service.ts","lineNumber":124,"sourceCode":"      }\n\n      const oEmbedUrl = config.buildOEmbedUrl(url);\n\n      if (!oEmbedUrl) {\n        return null;\n      }\n\n      // if the config useOEmbedUrlDirectly is true, return the url directly as iframe_url\n      if (config.useOEmbedUrlDirectly) {\n        return {\n          iframe_url: oEmbedUrl,\n        };\n      }\n\n      // otherwise, fetch the oEmbed data\n      const response = await fetch(oEmbedUrl, { signal });\n      if (!response.ok) {\n        console.warn(\n          `Failed to fetch oEmbed data: ${response.status} ${response.statusText}`\n        );\n        return null;\n      }\n\n      const data = await response.json();\n      return data as EmbedIframeData;\n    } catch (error) {\n      if (error instanceof Error && error.name !== 'AbortError') {\n        console.error('Error fetching embed iframe data:', error);\n      }\n      return null;\n    }\n  };\n\n  addEmbedIframeBlock = (\n    props: Partial<EmbedIframeBlockProps>,\n    parentId: string,","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/blocksuite/affine/shared/src/services/embed-iframe/embed-iframe-service.ts#L106-L142","documentation":"Warning logged in EmbedIframeService when the oEmbed endpoint responds with a non-ok HTTP status (e.g. 404 or 403 for the provider's oEmbed URL). Returns null so no iframe embed is produced; the faulting input is the provider oEmbed request that the remote service refused or could not serve.","triggerScenarios":"Triggered when the oEmbed endpoint responds with a non-OK HTTP status while the embed iframe service fetches embed metadata, returning null data.","commonSituations":"Occurs when embedding a link whose provider's oEmbed API is down, rate-limited, or rejects the URL. Retry later or verify the link is publicly accessible.","solutions":["Check the oEmbed endpoint status and retry.","Verify the provider URL is supported and reachable."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}