After migrating to VCF 9.1.0 (vRA 8.18.1 patch 3), workflows utilizing VraGenericRestClient may throw an "Illegal character in authority" error during client.execute(). This issue is specific to the VraGenericRestClient object; standard RESTHost objects and external API tools (e.g., Postman) function correctly.
The following code pattern triggers the error in VCF 9.1.0 environments:
// This pattern fails in VCF 9.1.0
var client = _restHost.createRestClient();
var request = client.createRequest("PATCH", "/iaas/api/machines/uuid-here", payload);
var response = client.execute(request);
VCF Automation 9.1
To resolve this, migrate the workflow to use RESTHost as a stable alternative.
Recommended Workaround (Using RESTHost): Instantiate a standard RESTHost and define the request manually. This avoids the URI parsing logic inherent in the generic client.
// Use this pattern as a stable alternative
var restHost = Server.findForType("REST:RESTHost", "your-rest-host-id");
var request = restHost.createRequest("PATCH", "/iaas/api/machines/uuid-here", JSON.stringify(payload));
request.contentType = "application/json";
var response = request.execute(); // Functional alternativeVerification:
VraGenericRestClient calls with RESTHost calls in your workflow.application/json as shown above.