Error on system log about REST "Error executing REST request: Invalid uri"

Rain Vaine
Kilo Sage

Hello experts,
I not confident in my technical ability regarding the operation on REST. We currently have a script include which check for the user REST api then retrieve the user information. We encountered some logs in the system logs with this messages:
1. Error executing REST request: Invalid uri
2. REST Msg Outbound - RESTMessageClient : Error executing REST request: Invalid uri 'restAPI link': escaped absolute path not valid: java.lang.IllegalArgumentException: Invalid uri 'restAPI link': escaped absolute path not valid: org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)

I found some bits of pieces on info in the community but I can't really comprehend the information from those. Does anyone of you have encountered a similar issue?
Can you give your insights on what is the possible cause for this logs?

Regards,
Vaine

1 REPLY 1

Nick Parsons
Mega Sage

Please share your code, we can't help much without that.

Invalid URI means that URL you're supplying for the REST call isn't valid. URLs need to be escaped sometimes (as some characters have special meanings in a URL, so to use those characters as regular characters they need to be encoded/escaped), which the error seems to be hinting at. Have you looked into your URL to confirm that it looks as expected?