nexu-io/open-design · error · TeamResourceAuthorityUnavailableError
WORKSPACE_RESOURCE_AUTHORITY_UNAVAILABLE
WORKSPACE_RESOURCE_AUTHORITY_UNAVAILABLE
Error message
team resource authority is temporarily unavailable
What it means
Thrown as `TeamResourceAuthorityUnavailableError` (HTTP 503, `code = WORKSPACE_RESOURCE_AUTHORITY_UNAVAILABLE`, `retryable = true`) when the authoritative live read of shared resources rejects during `unshare`. The unshare path treats this read as the idempotency boundary — a cached/session fallback may still remember an already-removed design system and must never authorize moving the independently shareable backing project, so the error is surfaced for retry rather than fallen back from.
Source
Thrown at apps/daemon/src/design-systems/team-project-share.ts:231
error,
compensationError('share', rollbackError, forwardError),
);
}
}
throw error;
}
return result;
},
async unshare(resourceId, scope) {
// This live read is the idempotency boundary. A cached/session fallback
// may still remember an already-removed design system, so it must never
// authorize moving the independently shareable backing project.
let sharedResource;
try {
sharedResource = (await resource.sharedResources(scope, { authoritative: true }))
.find((candidate) => candidate.id === resourceId);
} catch (error) {
throw new TeamResourceAuthorityUnavailableError(error);
}
if (!sharedResource) return false;
if (!sharedResource.canUnshare) {
throw new TeamResourceShareForbiddenError();
}
const linkedProject = await options.prepare(resourceId, scope);
await linkedProject.transition('personal');
try {
return await resource.unshare(resourceId, scope);
} catch (error) {
try {
await linkedProject.transition('team');
} catch (rollbackError) {
// Same convergence rule in reverse: when restoring Team also fails,
// retry the original resource removal once. A success means both
// halves are Personal and the requested unshare can truthfully
// complete.
try {View on GitHub (pinned to 5be4028344)
Solutions
- Retry the unshare after a short backoff — the error is marked `retryable`.
- If it persists, verify Team hub / Vela CLI connectivity and the login session.
- Do NOT fall back to a cached resource list to authorize the unshare; that would bypass the idempotency boundary.
Defensive patterns
Strategy: retry
Validate before calling
// No deterministic pre-check: the authority read itself may fail.
// Perform a lightweight hub health check before unshare if available:
if (typeof resource.pingAuthority === 'function') {
await resource.pingAuthority(scope); // throws if hub unreachable
}
await linkedShare.unshare(resourceId, scope); Try / catch
import { TeamResourceAuthorityUnavailableError } from '../collab/team-resource-share.js';
async function unshareWithRetry(resourceId, scope, attempts = 3) {
for (let i = 0; i < attempts; i += 1) {
try {
return await linkedShare.unshare(resourceId, scope);
} catch (err) {
if (err instanceof TeamResourceAuthorityUnavailableError && i < attempts - 1) {
await new Promise((r) => setTimeout(r, 500 * (i + 1)));
continue;
}
throw err;
}
}
} Prevention
- Retry on TeamResourceAuthorityUnavailableError — it is explicitly retryable (503).
- Never fall back to a cached resource list to authorize unshare; the authoritative read is the idempotency boundary.
- Surface these as transient errors to users rather than permanent failures.
When it happens
Trigger: Calling `unshare`; `resource.sharedResources(scope, { authoritative: true })` throws (network failure, hub outage, auth error, timeout) before the candidate can be found.
Common situations: Transient Team hub outage or network blip during an unshare. The Vela CLI/login session is temporarily unavailable. Rate limiting from the hub. This is explicitly retryable — callers should distinguish it from an authoritative empty result.
Related errors
- design system backing project publish failed
- design system backing project is unavailable
- design system backing project belongs to another workspace
- workspace_resource_share_denied
- WORKSPACE_AUTHORITY_UNAVAILABLE
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/1ffab6703b62b988.
Report an issue: GitHub.