Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Extract Policy Failures

Hi Team,

I have a POST call where I am using Extract Variable to extract JSON variables and also QueryParam. I am using IgnoreUnresolvedVariable as True.

In few of the calls, the payload is not coming where the Extract policy is failing with below error

error.class: com.apigee.kernel.exceptions.spi.UncheckedException
error.cause: Expecting { or { at line 1

When I am using {} in the POST call, then it is getting success. Is it mandatory that I need to send payload to make this extract policy to get success ? or any other way I can mitigate this issue?

Your help is much appreciated. 

Solved Solved
0 1 140
1 ACCEPTED SOLUTION

Does that mean sometimes the payload is JSON and sometimes it's not? You could use a condition on the extract variables policy to check headers or check a payload exists for example before executing the policy.

View solution in original post

1 REPLY 1

Does that mean sometimes the payload is JSON and sometimes it's not? You could use a condition on the extract variables policy to check headers or check a payload exists for example before executing the policy.