{"record":{"id":"bbf3fe6bd8c3a8c3","repo":"different-ai/openwork","slug":"failed-to-update-role-response-status","errorCode":null,"errorMessage":"Failed to update role (${response.status}).","messagePattern":"Failed to update role \\((.+?)\\)\\.","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx","lineNumber":848,"sourceCode":"      throw new Error(\"Only workspace owners and super-admins can manage roles.\");\n    }\n    if (typeof input.roleName === \"string\") {\n      ensureRoleCanBeAssigned(input.roleName);\n    }\n\n    await runMutation(\"update-role\", async () => {\n      ensureActiveOrganizationSelected();\n      const { response, payload } = await requestJson(\n        `/v1/roles/${encodeURIComponent(roleId)}`,\n        {\n          method: \"PATCH\",\n          body: JSON.stringify(input),\n        },\n        12000,\n      );\n\n      if (!response.ok) {\n        throw getRequestError(payload, response, `Failed to update role (${response.status}).`);\n      }\n    });\n  }\n\n  async function deleteRole(roleId: string) {\n    if (!getCurrentAccess().canManageRoles) {\n      throw new Error(\"Only workspace owners and super-admins can manage roles.\");\n    }\n\n    await runMutation(\"delete-role\", async () => {\n      ensureActiveOrganizationSelected();\n      const { response, payload } = await requestJson(\n        `/v1/roles/${encodeURIComponent(roleId)}`,\n        { method: \"DELETE\" },\n        12000,\n      );\n\n      if (response.status !== 204 && !response.ok) {","sourceCodeStart":830,"sourceCodeEnd":866,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx#L830-L866","documentation":"Error \"Failed to update role (${response.status}).\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at ee/apps/den-web/app/(den)/dashboard/_providers/org-dashboard-provider.tsx:848 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}