@Dino
I have a proxy setup, which is supposed to handle all invalid url request with respect to basepath.
ProxyName: InvalidUrl
Url: https://myorg.apigee.net/
Base Path: /
There is no target end points.
I have following in my preflow, so whatever request comes to this proxy is basically wrong, so raise error.
<PreFlow name="PreFlow">
<Request>
<Step>
<Name>Error.NoTarget</Name>
</Step>
<Step>
<Name>RaiseFault.Error</Name>
</Step>
</Request>
<Response/>
</PreFlow>
Error.NoTarget is javascript policy to setup error message:
context.setVariable("flow.error.status", "404");
context.setVariable("flow.error.message", "Resource not found: " + context.getVariable("proxy.pathsuffix"));
context.setVariable("flow.error.title", "Resource not found.");
and RaiseFault.Error is raise fault policy to raise above error.
So, If I hit,
https://myorg.apigee.net/
or https://myorg.apigee.net/doesnotexist
I see the trace of those requests within this proxy and it returns expected customized error message.
If I hit,
https://myorg.apigee.net//
there is no trace, that means, something happens within apigee, even before it reaches to proxy.
I have tried through curl, postman, and browser(chrome, firefox), same result.
{"fault":{"faultstring":"Invalid path GET \/\/ HTTP\/1.1","detail":{"errorcode":"protocol.http.InvalidPath"}}}
Thanks