{"id":1554,"date":"2025-10-01T13:40:49","date_gmt":"2025-10-01T13:40:49","guid":{"rendered":"http:\/\/gogetmuscle.com\/?p=1554"},"modified":"2025-10-01T17:39:33","modified_gmt":"2025-10-01T17:39:33","slug":"hs-sdk-contact-search-working-update-returns-object-not-found","status":"publish","type":"post","link":"http:\/\/gogetmuscle.com\/index.php\/2025\/10\/01\/hs-sdk-contact-search-working-update-returns-object-not-found\/","title":{"rendered":"HS SDK contact search working, update returns Object not found"},"content":{"rendered":"

Hi,<\/P>

I am using the HS SDK (Node.js) to create and update contacts. In the recent few weeks, I encountered an interesting error that occurs sometimes (let’s say a few hundred times per thousand).
The contacts were created in HS sometimes a few minutes before, but in many cases, the contact exists on the HS side for months.<\/P>

\u00a0<\/P>

The code makes a call for the user, via the `<\/P>

crm.contacts.searchApi.doSearch<\/SPAN><\/PRE><\/DIV><\/DIV>

` request, searching for a contact by email. The response is clear, the contact does indeed exist:<\/P>

\u00a0<\/P>CollectionResponseWithTotalSimplePublicObjectForwardPaging {
\n total: 1,
\n results: [
\n SimplePublicObject {
\n createdAt: 2025-09-12T11:03:52.204Z,
\n archived: false,
\n id: ‘XXXXXXXXX’,
\n properties: [Object],
\n updatedAt: 2025-10-01T02:23:36.480Z
\n }
\n ]
\n}

And logged into HS and searched in the contacts as well to show the contact. Everything is present, fine as-is.\u00a0<\/P>

\u00a0<\/P>

After the search request is done, within 1 second, the implementation does another request to update the contact (by email address)<\/P>

‘crm.contacts.basicApi.update’<\/SPAN>,<\/PRE><\/DIV>

\u00a0<\/P>

But for this, it got an error response<\/P>{“total”:1,”results”:[{“createdAt”:”2025-09-12T11:03:52.204Z”,”archived”:false,”id”:”[REDACTED]817″,”properties”:{“createdate”:”2025-09-12T11:03:52.204Z”,”email”:”john.doe@gmail.com”,”firstname”:”John”,”hs_object_id”:”[REDACTED]817″,”lastmodifieddate”:”2025-09-23T17:45:43.067Z”,”lastname”:”Doe”},”updatedAt”:”2025-09-23T17:45:43.067Z”}]}”,{“code”:404,”body”:{“status”:”error”,”message”:”Object not found. objectId are usually numeric.”,”correlationId”:”[REDACTED]”,”context”:{“id”:[“john.doe%40gmail.com?idProperty=email”]},”category”:”OBJECT_NOT_FOUND”},”headers”:{“access-control-allow-credentials”:”false”,”cf-cache-status”:”DYNAMIC”,”cf-ray”:”[REDACTED]”,”connection”:”keep-alive”,”content-encoding”:”gzip”,”content-type”:”application\/json;charset=utf-8″,”date”:”Tue, 23 Sep 2025 18:06:50 GMT”,”nel”:”{“success_fraction”:0.01,”report_to”:”cf-nel”,”max_age”:604800}”,”report-to”:”{“endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report\/v4?s=[REDACTED]”}],”group”:”cf-nel”,”max_age”:604800}”,”server”:”cloudflare”,”set-cookie”:”__cf_bm=[REDACTED]; path=\/; expires=Tue, 23-Sep-25 18:36:50 GMT; domain=.hubapi.com; HttpOnly; Secure; SameSite=None”,”strict-transport-security”:”max-age=31536000; includeSubDomains; preload”,”transfer-encoding”:”chunked”,”vary”:”origin, Accept-Encoding”,”x-hubspot-correlation-id”:”[REDACTED]”,”x-hubspot-notfound”:”true”,”x-hubspot-ratelimit-interval-milliseconds”:”10000″,”x-hubspot-ratelimit-max”:”110″,”x-hubspot-ratelimit-remaining”:”105″,”x-hubspot-ratelimit-secondly”:”11″,”x-hubspot-ratelimit-secondly-remaining”:”10″}}

\u00a0<\/P>

The SDK version is `<\/P>

@hubspot\/api-client”<\/SPAN>: “^11.0.0”<\/SPAN><\/PRE><\/DIV>

\u00a0<\/P>

The code was used in the previous 6 months with literal millions of contacts, and this error did not occur.\u00a0<\/P>

The first time it was seen on the 22nd of August, 2025, then a few times in the first week of September, and since ~25th of September, the percentage has gone up from less than 1% to 5%.\u00a0<\/P>

\u00a0<\/P>

Comparing different contacts, there is no difference in the data set nor in timing, how much time spans between a creation, search, and update.\u00a0<\/P>

Also, all the failure has the same message, the same structure, and no differences present.\u00a0<\/P>

\u00a0<\/P>

Has anyone else countered this issue?\u00a0<\/P>

\u00a0<\/P>

\u00a0<\/P>

\u00a0<\/P>

\u00a0<\/P>

\u00a0<\/P>

\u00a0<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"

Hi,I am using the HS SDK (Node.js) to create and update contacts. In the recent few weeks, I encountered an interesting error that occurs sometimes (let’s say a few hundred times per thousand).The contacts were created in HS sometimes a few minutes before, but in many cases, the contact exists on the HS side for […]<\/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\/1554"}],"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=1554"}],"version-history":[{"count":2,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/1554\/revisions"}],"predecessor-version":[{"id":1556,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/posts\/1554\/revisions\/1556"}],"wp:attachment":[{"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/media?parent=1554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/categories?post=1554"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gogetmuscle.com\/index.php\/wp-json\/wp\/v2\/tags?post=1554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}