Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

404 no resource found error due to path variable having a '/' char in its value.

I have an proxy flow having condition as <Condition>(proxy.pathsuffix MatchesPath "/eligibleProduct/{folderId}/{contractId}") and (request.verb = "GET"). However user is having the value of contract id like  contractId=XYZ/B due to which request is failing in apigee with 404 no resource found error. How to fix this issue and how can we extract the contract id value including '/' in a new variable.

0 1 125
1 REPLY 1

Hi Saurabh,

This issue isn’t really with Apigee - the root cause is that / is a reserved character in URLs, used to separate path segments. So when a value like contractId=XYZ/B is passed directly in the path, Apigee treats it as two separate path segments, not one - hence the 404.

To fix this:

  • The client must URL-encode values like XYZ/B. In this case, contractId=XYZ%2FB, so the full path would be something like /eligibleProduct/folder123/XYZ%2FB. Apigee will then correctly treat that as a single segment.

  • Alternatively, if the contract ID can contain special characters frequently, consider moving such values to headers, where / is not a control character.

Top Solution Authors