different-ai/openwork · error · Error

Failed to delete role (${response.status}).

Error message

Failed to delete role (${response.status}).

What it means

Error "Failed to delete role (${response.status})." thrown in different-ai/openwork.

Source

Thrown at ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx:867

      }
    });
  }

  async function deleteRole(roleId: string) {
    if (!getCurrentAccess().canManageRoles) {
      throw new Error("Only workspace owners and super-admins can manage roles.");
    }

    await runMutation("delete-role", async () => {
      ensureActiveOrganizationSelected();
      const { response, payload } = await requestJson(
        `/v1/roles/${encodeURIComponent(roleId)}`,
        { method: "DELETE" },
        12000,
      );

      if (response.status !== 204 && !response.ok) {
        throw getRequestError(payload, response, `Failed to delete role (${response.status}).`);
      }
    });
  }

  useEffect(() => {
    return () => {
      setRequestOrgScope(null);
    };
  }, []);

  useEffect(() => {
    pathnameRef.current = pathname;
    if (pathname !== ORG_SETTINGS_PATH) {
      setOrgSettingsCompletion(null);
    }
  }, [pathname]);

  useEffect(() => {

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx:867 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/d80e2a7883a0ad99. Report an issue: GitHub.