Not sure if this is the right place to post, but I’m running into an error while using the code from the Automation contact deduplication use case. It is successfully identifying duplicates but running into an error when it tries to merge.
022-06-02T17:03:13.935Z ERROR Unhandled Promise Rejection {“errorType”:“Runtime.UnhandledPromiseRejection”,“errorMessage”:“HttpError: HTTP request failed”,“reason”:{“errorType”:“HttpError”,“errorMessage”:“HTTP request failed”,“response”:{“statusCode”:401,“body”:{“status”:“error”,“message”:“Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at Accounts Dashboard | HubSpot, 02 Jun 2022 17:03:13 GMT”,“content-type”:“application/json;charset=utf-8”,“content-length”:“316”,“connection”:“close”,“cf-ray”:“7151c2de7a4a6fb0-IAD”,“strict-transport-security”:“max-age=31536000; includeSubDomains; preload”,“vary”:“Accept-Encoding”,“cf-cache-status”:“DYNAMIC”,“access-control-allow-credentials”:“false”,“expect-ct”:“max-age=604800, report-uri=\”[https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\\](https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\)“”,“x-hubspot-correlation-id”:“bc0f85eb-b94a-4126-922a-0af227b13bab”,“x-trace”:“2B45EDE401B146B1F69B1C172D4A9A365B7A587D0C000000000000000000”,“report-to”:“{\“endpoints\”:[{\“url\”:\“https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=g3bFr0zB7uW4LerStx18VUAbNVUAM5iGAoARftAM%2BjaHj9TYE77MG7Jtq%2FUdH6NKXoRk%2FT9RroA3%2FXLwMubgjNynVfZIa3eLXkgpiN499fR%2FQ8AOH3tZKl17BnMVHNIv\”}],\“group\”:\“cf-nel\”,\“max_age\”:604800}”,“nel”:“{\“success_fraction\”:0.01,\“report_to\”:\“cf-nel\”,\“max_age\”:604800}”,“server”:“cloudflare”,“alt-svc”:“h3=\”:443\“; ma=86400, h3-29=\”:443\“; ma=86400”},“request”:{“uri”:{“protocol”:“https:”,“slashes”:true,“auth”:null,“host”:“api.hubapi.com”,“port”:null,“hostname”:“api.hubapi.com”,“hash”:null,“search”:“?properties=phone”,“query”:“properties=phone”,“pathname”:“/crm/v3/objects/contacts/222551”,“path”:“/crm/v3/objects/contacts/222551?properties=phone”,“href”:“https://api.hubapi.com/crm/v3/objects/contacts/222551?properties=phone"},“method”:“GET”,“headers”:{“User-Agent”:"hubspot-api-client-nodejs; 3.4.1”,“Accept”:“application/json”}}},“body”:{},“statusCode”:401,“name”:“HttpError”,“stack”:[“HttpError: HTTP request failed”," at Request._callback (/opt/nodejs/node_modules/@hubspot/api-client/lib/codegen/crm/contacts/api/basicApi.js:318:40)“,” at Request.self.callback (/opt/nodejs/node_modules/request/request.js:185:22)“,” at Request.emit (events.js:314:20)“,” at Request.<anonymous> (/opt/nodejs/node_modules/request/request.js:1154:10)“,” at Request.emit (events.js:314:20)“,” at IncomingMessage.<anonymous> (/opt/nodejs/node_modules/request/request.js:1076:12)“,” at Object.onceWrapper (events.js:420:28)“,” at IncomingMessage.emit (events.js:326:22)“,” at endReadableNT (_stream_readable.js:1241:12)“,” at processTicksAndRejections (internal/process/task_queues.js:84:21)“]},“promise”:{},“stack”:[“Runtime.UnhandledPromiseRejection: HttpError: HTTP request failed”,” at process.<anonymous> (/var/runtime/index.js:35:15)“,” at process.emit (events.js:314:20)“,” at processPromiseRejections (internal/process/promises.js:209:33)“,” at processTicksAndRejections (internal/process/task_queues.js:98:32)"]}
Memory: 57/128 MB
Runtime: 823.62 ms
I’m brand new to Operations Hub and coding in node.js so I’m not sure where to even look to solve this issue. Thanks.