Hi All,
One of the if conditions in a XOR gate is defined as follows and the output is getting written to a DS entity. However, this code is getting stuck at the XOR gate level itself giving the error as below. Please advise:Error: An error occurred while evaluating expression: =a!localVariables( local!statusCode: if( rule!APN_isBlank( pv!RMO_CDT_TxnLog.responseMessage ), "400", a!fromJson( pv!RMO_CDT_TxnLog.responseMessage ).StatusCode), and( or( local!statusCode = "0", local!statusCode = "200" ), pv!Result.statusCode = "200" )) (Expression evaluation error at function a!fromJson: The jsonText parameter was not valid JSON.) (Logic Output)Code configured in XOR gate:
= a!localVariables( local!statusCode: if( rule!APN_isBlank(pv!RMO_CDT_TxnLog.responseMessage), "400", a!fromJson(pv!RMO_CDT_TxnLog.responseMessage).StatusCode ), and( or( local!statusCode = "0", local!statusCode = "200" ), pv!Result.statusCode = "200" ))Thanks.
Discussion posts and replies are publicly visible
Hello, that error is occurring because, as the message says, it's trying to convert a json value but receiving a non-json value (pv!RMO_CDT_TxnLog.responseMessage).
What you could do here is: