toeverything/AFFiNE · error
Error fetching embed:
Error message
Error fetching embed:
What it means
Warning logged in the Notion HTML adapter when fetching the asset behind a Notion embed URL fails (network error, missing asset entry, or non-ok response). The embed's blob is not resolvable so the embed block is exported without its resolved content; conversion of the rest of the document continues.
Source
Thrown at blocksuite/affine/blocks/attachment/src/adapters/notion-html.ts:67
while (embededURLSplit.length > 0) {
const key = assets
.getPathBlobIdMap()
.get(decodeURIComponent(embededURLSplit.join('/')));
if (key) {
blobId = key;
break;
}
embededURLSplit.shift();
}
const value = assets.getAssets().get(blobId);
if (value) {
name = getAssetName(assets.getAssets(), blobId);
size = value.size;
type = value.type;
}
} else {
const res = await fetch(embededURL).catch(error => {
console.warn('Error fetching embed:', error);
return null;
});
if (!res) {
return;
}
const resCloned = res.clone();
name =
getFilenameFromContentDisposition(
res.headers.get('Content-Disposition') ?? ''
) ??
(embededURL.split('/').at(-1) ?? 'file') +
'.' +
(res.headers.get('Content-Type')?.split('/').at(-1) ?? 'blob');
const file = new File([await res.blob()], name, {
type: res.headers.get('Content-Type') ?? '',
});
size = file.size;
type = file.type;View on GitHub (pinned to b4c8548c09)
Solutions
- Check the embed URL is reachable; retry the fetch.
- Handle the fetch failure by skipping the embed.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Triggered when the Notion HTML adapter fails to fetch an embedded asset URL while importing a Notion-exported HTML archive, so the attachment is skipped.
Common situations: Occurs during Notion import when external embed URLs are unreachable or blocked by network/CORS. Re-import with the asset files included in the export archive or check network access.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/c38c5aca258a5490.
Report an issue: GitHub.