When the fhir server returns an error from http.post, the response body has string encoded JSON.
{
"body": "{\"resourceType\":\"OperationOutcome\",\"issue\":[{\"ext
"duration": 695,
"headers": {
"connection": "keep-alive",
"content-length": "22088",
"content-type": "application/fhir+json; charset=utf-8",
"date": "Fri, 20 Mar 2026 16:06:11 GMT",
"keep-alive": "timeout=5",
"vary": "Accept-Encoding",
"x-openhim-transactionid": "69bd707380863bf16a1b4ff8"
},
"message": "POST to http://172.209.216.154:5001/fhir returned 422: Unprocessable Entity",
"method": "POST",
"statusCode": 422,
"statusMessage": "Unprocessable Entity",
"url": "http://172.209.216.154:5001/fhir"
}
When the fhir server returns an error from http.post, the response body has string encoded JSON.
I've truncated a response but it looks a bit like this: