{"id":1470,"date":"2025-09-24T17:32:58","date_gmt":"2025-09-24T17:32:58","guid":{"rendered":"http:\/\/gogetmuscle.com\/?p=1470"},"modified":"2025-09-24T17:43:03","modified_gmt":"2025-09-24T17:43:03","slug":"confusing-issue-with-a-search-request-for-contacts","status":"publish","type":"post","link":"http:\/\/gogetmuscle.com\/index.php\/2025\/09\/24\/confusing-issue-with-a-search-request-for-contacts\/","title":{"rendered":"Confusing issue with a search request for contacts"},"content":{"rendered":"

Our cursor poller for contacts recently started failing, and the resulting message only tells us there was some issue, but doesn\u00b4t specify why.

Here is the code that breaks:

<\/P>client = hubspot.Client.create(access_token=HUBSPOT_API_KEY)<\/p>\n

with open (‘columns’, ‘rb’) as fp:
\n columns = pickle.load(fp)<\/p>\n

if ascending:
\n public_object_search_request = PublicObjectSearchRequest(
\n filter_groups=[
\n {
\n “filters”: [
\n {
\n “propertyName”: “lastmodifieddate”,
\n “operator”: “GT”,
\n “value”: cursor.datetime,
\n }
\n ]
\n }
\n ],
\n sorts=[{“propertyName”: “lastmodifieddate”, “direction”: “ASCENDING”}],
\n properties=columns,
\n limit=200 )
\n else:
\n public_object_search_request = PublicObjectSearchRequest(
\n filter_groups=[
\n {
\n “filters”: [
\n {
\n “propertyName”: “lastmodifieddate”,
\n “operator”: “LT”,
\n “value”: cursor.datetime,
\n }
\n ]
\n }
\n ],
\n sorts=[{“propertyName”: “lastmodifieddate”, “direction”: “DESCENDING”}],
\n properties=columns,
\n limit=200)<\/p>\n

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

<\/P>{“status”:”error”,”message”:”There was a problem with the request.”,”correlationId”:”e3997f3e-c69d-436d-b351-25eabd0b9235″}<\/p>\n","protected":false},"excerpt":{"rendered":"

Our cursor poller for contacts recently started failing, and the resulting message only tells us there was some issue, but doesn\u00b4t specify why.Here is the code that breaks:client = hubspot.Client.create(access_token=HUBSPOT_API_KEY) 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, […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[],"_links":{"self":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/1470"}],"collection":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/comments?post=1470"}],"version-history":[{"count":1,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/1470\/revisions"}],"predecessor-version":[{"id":1471,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/1470\/revisions\/1471"}],"wp:attachment":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/media?parent=1470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/categories?post=1470"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/tags?post=1470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}