Expand my Community achievements bar.

Need help for Adobe Target entities reject case


Level 1

Hi, all,  might need some help for how we could getting Adobe Target /entities API call to return the error of "rejected" defined in https://developer.adobe.com/target/administer/recommendations-api/#tag/Entities/operation/saveEntiti...

I'm doing this for Unit testing in our Java code, however,  it seems I couldn't get to this case, the response shall be looking like:


public static final String JSON_RESPONSE_REJECT = "{\"inserted/updated\":0, \"rejected\":1, \"rejectCauses\":[{\"cause\": {\"key\": \"123\", " +
"\"keyArguments\": [\"someArguments\"], \"text\": \"someText\"}, \"occurrences\": 1}]}";


And the doc is not clear enough,   it just mentioned "Error messages that caused the rejection of entities. Details can be found in cause.text.",  and I couldn't find the cause.text anywhere.

Anyone knows how we could make Adobe Target entities API reject the payload and return the similar response?  (Not 400 error validating JSON format)

0 Replies