{"record":{"id":"a68ff8637b300816","repo":"toeverything/AFFiNE","slug":"failed-to-parse-attachment-footnote-definition","errorCode":null,"errorMessage":"Failed to parse attachment footnote definition:","messagePattern":"Failed to parse attachment footnote definition:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"blocksuite/affine/blocks/attachment/src/adapters/markdown.ts","lineNumber":74,"sourceCode":"            return;\n          }\n          walkerContext\n            .openNode(\n              createAttachmentBlockSnapshot({\n                id: nanoid(),\n                props: {\n                  name: fileName,\n                  sourceId: blobId,\n                  footnoteIdentifier,\n                  style: 'citation',\n                },\n              }),\n              'children'\n            )\n            .closeNode();\n          walkerContext.skipAllChildren();\n        } catch (err) {\n          console.warn('Failed to parse attachment footnote definition:', err);\n          return;\n        }\n      },\n    },\n    fromBlockSnapshot: {},\n  };\n\nexport const AttachmentBlockMarkdownAdapterExtension =\n  BlockMarkdownAdapterExtension(attachmentBlockMarkdownAdapterMatcher);\n","sourceCodeStart":56,"sourceCodeEnd":84,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/blocksuite/affine/blocks/attachment/src/adapters/markdown.ts#L56-L84","documentation":"Warning logged in the attachment markdown-adapter walker when parsing the footnote definition for an attachment citation fails — the footnote's JSON does not parse or does not match FootNoteReferenceParamsSchema. The attachment is simply not converted (the node is skipped) and the adapter keeps walking the rest of the markdown.","triggerScenarios":"Triggered when the markdown adapter fails to JSON-parse or decode the footnote definition attached to an attachment node during markdown import, causing the attachment footnote to be skipped.","commonSituations":"Occurs when importing markdown content containing malformed or hand-edited attachment footnotes. The affected attachment is skipped; verify the footnote definition is valid JSON.","solutions":["Fix the attachment footnote syntax in the markdown source.","Remove the malformed footnote definition."],"exampleFix":null,"handlingStrategy":"try-catch","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-14T05:17:10.506Z"}