err:frontline:client:ambiguous_path400 Bad Request. The gateway rejects:
- Encoded dot segments, such as
%2e%2eor..;. - Double-encoded slashes or backslashes, such as
%252For%255C. %2F(an encoded/) or%5C(an encoded\), when a policy matches paths with a regex.
Example response
If you’re calling an API hosted on Unkey
Send the path without encoded dot segments or double encoding. If a value such as an ID contains/ and the API still rejects it, send it in a query parameter, a header, or the request body instead of the path.
If you own this API
Frameworks disagree on these paths. Some resolve%2e%2e as .. and others treat it as a literal name. Some treat %2F as a path separator and others keep it inside the segment. An app that decodes the path twice turns %252F into /. The gateway can’t tell which handler your app will pick, so it rejects these paths instead of risking a policy being skipped.
A single %2F or %5C is only rejected when an enabled policy matches paths with a regex, because only a regex like [^/]+ can be bypassed by changing how many segments a path has. Prefix and exact policies accept it. The check runs only for apps with enabled policies other than logging.
How to fix
- If you need
/in path values, useprefixorexactpath matches instead ofregex. - Otherwise, move values that can contain
/or\out of the path, into a query parameter, header, or body, and update your clients.
Related errors
err:frontline:client:firewall_denied: a firewall policy matched the request and denied it.err:frontline:client:openapi_validation_failed: the request didn’t match the OpenAPI spec.