Rest calls in Aria Orchestrator 8.12 using the Aria Automation plugin with special characters may fail with 400 Invalid request body
search cancel

Rest calls in Aria Orchestrator 8.12 using the Aria Automation plugin with special characters may fail with 400 Invalid request body

book

Article ID: 314933

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

  • Rest calls initiated in Aria Orchestrator using the Aria Automation plugin with special characters may fail with 400 Invalid request body after upgrade to Aria Automation 8.12
  • The logfiles contain errors similar to:

2023-05-03 09:24:33.713 +02:00INFO ErrorCode: 400
2023-05-03 09:24:33.716 +02:00INFO Request Payload:

2023-05-03 09:24:33.717 +02:00INFO "{\"name\":\"Test with special character like Ü \"}"
2023-05-03 09:24:33.718 +02:00INFO Response: {"message":"Invalid request body.","statusCode":400,"errorCode":10002}


Environment

VMware Aria Automation Orchestrator 8.12.x
VMware Aria Automation 8.12.x

Resolution

To resolve the issue add an additional header to the rest api request specifying the character set as utf-8:
 

var restClient = vraHost.createRestClient()
var request = restClient.createRequest(method, path, content)

request.setHeader("Content-Type", "application/json; charset=utf-8")

Additional Information

In previous versions when the user does not specifically mention the Content-Type in headers it was passed from the plugin. After recent changes to enhance support for other Content-types in vRealize Automaiton 8.11.2, the charset is no longer passed by default in the Content-type, which causes the issue.

The Aria Automaiton 8.13.1 version will revert to previous behaviour of passing the charset by default in the Content-type header.