toeverything/AFFiNE · error · Error
No workspace
Error message
No workspace
What it means
A GraphQL response-shape guard in the invoices store: after querying workspaceInvoicesQuery, a missing data.workspace field means the server did not return the workspace (deleted, inaccessible, or the id is wrong). It fires when fetchWorkspaceInvoices is called with a workspaceId the current user cannot resolve; the faulting input is the workspaceId that matches no visible workspace.
Source
Thrown at packages/frontend/core/src/modules/cloud/stores/invoices.ts:38
}
return data.currentUser;
}
async fetchWorkspaceInvoices(
skip: number,
take: number,
workspaceId: string,
signal?: AbortSignal
) {
const data = await this.graphqlService.gql({
query: workspaceInvoicesQuery,
variables: { skip, take, workspaceId },
context: { signal },
});
if (!data.workspace) {
throw new Error('No workspace');
}
return data.workspace;
}
}
View on GitHub (pinned to b4c8548c09)
Solutions
- Select or create a workspace before viewing invoices.
- Wait for the workspace to finish loading and retry.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown in InvoicesStore.fetchWorkspaceInvoices when the GraphQL response has no workspace for the given workspaceId.
Common situations: Happens when viewing workspace invoices for a workspace that is inaccessible or deleted. Confirm workspace access and refresh.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/248e40f519b0843d.
Report an issue: GitHub.