err:unkey:data:policy_not_foundgateway.updatePolicy isn’t in the environment’s current policy list. You get HTTP 404.
Example response
Likely causes
- Someone called
gateway.setPoliciessince you saved the ID. It replaces the whole list and gives every policy a new ID. - The environment has never had policies set, so no ID matches.
How to fix
- Get the current list with
gateway.listPoliciesand use an ID from it. - In automation, replace the whole list with
gateway.setPoliciesinstead of updating by ID, or fetch fresh IDs before each update.
Related errors
err:unkey:data:environment_not_found: the environment doesn’t exist.err:unkey:data:key_space_not_found: a keyspace referenced by a key auth policy doesn’t exist in the .