err:unkey:data:flag_not_foundworkspace.updateFlag returns HTTP 404 when the requested slug doesn’t match
an existing flag definition. The update doesn’t create a flag. This error is
about workspace feature flags, not command-line flags.
How to fix
Check the flag slug before retrying the update:- Call
workspace.getFlagswith a credential for the intended workspace. - Use the flag’s map key from the response’s
dataobject as the update’sslug. - Check
allowOptInorallowOptOutbefore changing its value. A flag that exists but doesn’t permit the requested change returns HTTP 403 instead.