err:unkey:data:permission_not_founddetail names the slug.
Example response
Likely causes
- You attached a permission to a key or role before creating it. The whole request fails if any one slug is missing, and
detailnames the first. - The slug has a typo. Slugs aren’t case-sensitive.
- Your root key can’t read the permission.
permissions.getPermissionandpermissions.deletePermissionreturn this 404 instead of a 403. A key that can read the permission but lacks the action gets a 403err:unkey:authorization:insufficient_permissionsthat names the missing permission.
How to fix
- Create every permission you need with
permissions.createPermissionbefore you reference it. - Check the slug.
permissions.listPermissionsshows what exists. - On
permissions.getPermissionorpermissions.deletePermission, check the root key’s permissions before you decide the permission is missing.
Related errors
err:unkey:data:permission_already_exists: a slug collides on create.err:unkey:data:role_not_found: a role doesn’t exist.err:unkey:data:key_not_found: the key doesn’t exist.