toeverything/AFFiNE · error
ARTIFACT_UNAVAILABLE
ARTIFACT_UNAVAILABLE
Error message
The artifact is unavailable in the current scope.
What it means
Catch branch of the artifact read tool: the retrieval/read call failed or was denied (permissions or missing/invalid artifact) within the current retrieval scope; the error is logged as a warning and converted to an ARTIFACT_UNAVAILABLE tool error so the model gets a structured failure.
Source
Thrown at packages/backend/server/src/plugins/copilot/tools/artifact.ts:107
});
return {
artifact_id,
...result,
source: {
type: 'artifact',
workspace_id: options.workspace,
artifact_id,
name: result.name,
mime_type: result.mimeType,
revision: result.revision,
} satisfies ArtifactSource,
};
} catch (error) {
logger.warn('Artifact read denied or unavailable', error);
return toolError(
'Artifact Read Failed',
'The artifact is unavailable in the current scope.',
{ code: 'ARTIFACT_UNAVAILABLE', retryable: false }
);
}
},
});
View on GitHub (pinned to b4c8548c09)
Solutions
- Request an artifact within the current scope.
- Re-run the tool after the scope is updated.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Returned when the artifact read throws in its try block, meaning access was denied or the artifact could not be fetched within the current scope.
Common situations: The copilot tried to read an attachment that was removed or is not in the allowed scope. Re-attach the file or include it in the chat scope.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/1ed5499acdda9b4f.
Report an issue: GitHub.