nexu-io/open-design · error · AutomationWorkspaceScopeError
WORKSPACE_PROJECT_PERMISSION_DENIED
WORKSPACE_PROJECT_PERMISSION_DENIED
Error message
the reused project Workspace is no longer writable by this member
What it means
Thrown by authorizePersistedProjectWorkspace with code WORKSPACE_PROJECT_PERMISSION_DENIED and retryable=false. Same shape as error 27 but for the reused-project binding path: it looks the workspaceId up in the directory and requires activeWritableContext to succeed. The separate code lets callers branch project-reuse denials apart from automation-scope denials.
Source
Thrown at apps/daemon/src/automations/workspace-scope.ts:157
);
}
return context;
}
/**
* Resolve a reused project's persisted binding. The project row chooses the
* Workspace; the signed-in directory supplies the current member and authority.
*/
export async function authorizePersistedProjectWorkspace(
workspaceIdInput: string,
fetchWorkspaceDirectory: (() => Promise<WorkspaceDirectoryFetchResult>) | undefined,
): Promise<WorkspaceCollabContext> {
const workspaceId = workspaceIdInput.trim();
const items = await fetchDirectoryOrThrow(fetchWorkspaceDirectory);
const item = items.find((candidate) => candidate.workspaceId === workspaceId);
const context = activeWritableContext(item ? workspaceContextFromDirectoryItem(item) : null);
if (!context) {
throw new AutomationWorkspaceScopeError(
'WORKSPACE_PROJECT_PERMISSION_DENIED',
'the reused project Workspace is no longer writable by this member',
false,
);
}
return context;
}
View on GitHub (pinned to 5be4028344)
Solutions
- Restore the member's write access to that workspace.
- Rebind the project to a workspace the current member can write to, or fork the project into such a workspace.
- Delete the stale reused-project binding if it is no longer relevant (retryable=false).
Defensive patterns
Strategy: try-catch
Validate before calling
async function projectWorkspaceStillWritable(fetcher: () => Promise<{ ok: boolean; items: Array<{ workspaceId: string; writable: boolean }> }>, workspaceId: string): Promise<boolean> {
const dir = await fetcher();
if (!dir.ok) return false;
const item = dir.items.find(i => i.workspaceId === workspaceId);
return Boolean(item && item.writable);
} Try / catch
try {
await authorizePersistedProjectWorkspace(workspaceId, fetcher);
} catch (err) {
if (err instanceof AutomationWorkspaceScopeError && err.code === 'WORKSPACE_PROJECT_PERMISSION_DENIED') {
return forbidden('The reused project Workspace is no longer writable by this member.');
}
throw err;
} Prevention
- Before reusing a project, verify the current member still has write access to its workspace.
- When transferring project ownership, update or fork the binding in the same operation.
- Branch on the WORKSPACE_PROJECT_PERMISSION_DENIED code separately from WORKSPACE_ACCESS_DENIED — they have different remediation paths.
When it happens
Trigger: Reusing a project whose workspace the member has since lost access to; the workspace was transferred or archived after the project binding was persisted.
Common situations: Project handover where the original owner's membership was revoked; cross-workspace project import that did not update the binding.
Related errors
- WORKSPACE_ACCESS_DENIED
- design system backing project is unavailable
- WORKSPACE_AUTHORITY_UNAVAILABLE
- workspaceId is required
- WORKSPACE_PROJECT_PERMISSION_DENIED
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/dc01a47caad0d156.
Report an issue: GitHub.