Our cursor poller for contacts recently started failing, and the resulting message only tells us there was some issue, but doesn´t specify why.
Here is the code that breaks:
with open (‘columns’, ‘rb’) as fp:
columns = pickle.load(fp)
if ascending:
public_object_search_request = PublicObjectSearchRequest(
filter_groups=[
{
“filters”: [
{
“propertyName”: “lastmodifieddate”,
“operator”: “GT”,
“value”: cursor.datetime,
}
]
}
],
sorts=[{“propertyName”: “lastmodifieddate”, “direction”: “ASCENDING”}],
properties=columns,
limit=200 )
else:
public_object_search_request = PublicObjectSearchRequest(
filter_groups=[
{
“filters”: [
{
“propertyName”: “lastmodifieddate”,
“operator”: “LT”,
“value”: cursor.datetime,
}
]
}
],
sorts=[{“propertyName”: “lastmodifieddate”, “direction”: “DESCENDING”}],
properties=columns,
limit=200)
api_response = client.crm.contacts.search_api.do_search(public_object_search_request=public_object_search_request)
The search response is a status 400 with the following body