How can I transfer the HTTP status code of the vConnect Service based on certain business rules derived from the response object?
Let suppose I am getting 200 HTTP Status code of below Response:
{
"status": "success",
"code": "HTTP_SUCCESS",
"data": {
"ServiceExecutionStatus": "ERROR",
"Errors": {
"Error": {
"Code": "AUF-ESB-Err-03",
"Message": "javax.net.ssl.SSLKeyException: Hostname verification failed: HostnameVerifier=weblogic.security.utils.SSLWLSHostnameVerifier, hostname=echo.aryas.ai."
}
}
},
"successRule": "y",
"response_message": "Service Executed Successfully",
"response_type": "I"
}
I want to convert the HTTP Status Code 500 if data.ServiceExecutionStatus= ERROR. How I can do on vConnect Service ?