err:unkey:data:role_not_founddetail names the role.
Example response
Likely causes
- You attached a role to a key before creating it. The request stops at the first missing role.
- The name has a typo. Names aren’t case-sensitive, so
Adminfindsadmin. - Your root key can’t read the role.
permissions.getRoleandpermissions.deleteRolereturn this 404 instead of a 403. A key that can read the role but lacks the action gets a 403err:unkey:authorization:insufficient_permissionsthat names the missing permission.
How to fix
- Create the role with
permissions.createRolebefore you reference it. - Check the name.
permissions.listRolesshows what exists. - On
permissions.getRoleorpermissions.deleteRole, check the root key’s permissions before you decide the role is missing.
Related errors
err:unkey:data:role_already_exists: a name collides on create.err:unkey:data:permission_not_found: a permission doesn’t exist.err:unkey:data:key_not_found: the key doesn’t exist.