The problem here is that translatePath expects to be called with a properly encoded URL. However, the rewrite map is passing it non-encoded URLs. This breaks the contract of translatePath, causing it to OOPS.
The primary fix is to make sure that the rewrite map encodes URLs properly. A possible secondary fix is for translatePath to raise better errors in these cases.
The problem here is that translatePath expects to be called with a properly encoded URL. However, the rewrite map is passing it non-encoded URLs. This breaks the contract of translatePath, causing it to OOPS.
The primary fix is to make sure that the rewrite map encodes URLs properly. A possible secondary fix is for translatePath to raise better errors in these cases.