# Internal error on contacts merge

**URL:** <https://community.hubspot.com/t/internal-error-on-contacts-merge/63889>\
**Category:** APIs & Integrations\
**Created:** [August 27, 2022, 6:00pm UTC](https://community.hubspot.com/t/internal-error-on-contacts-merge/63889 "2022-08-27T18:00:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHayrapetyan](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@SHayrapetyan](https://community.hubspot.com/u/SHayrapetyan)\
**Post date:** [August 27, 2022, 6:00pm UTC](https://community.hubspot.com/t/internal-error-on-contacts-merge/63889/1 "2022-08-27T18:00:58Z")

</div>

Hi, I’m trying to merge multiple contacts into one, after first successful merge the second one raises error, `internal error`

```lia-code-sample
await Promise.mapSeries(contactIds, async (contactIdToMerge) => {
 const publicMergeInput = { primaryObjectId: primaryContactId, objectIdToMerge: contactIdToMerge };
 contact = await hubspotClient.crm.contacts.publicObjectApi.merge(publicMergeInput);
});

```

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [August 29, 2022, 4:47pm UTC](https://community.hubspot.com/t/internal-error-on-contacts-merge/63889/2 "2022-08-29T16:47:31Z")

</div>

Hey, @SHayrapetyan 👋 Could you add the full error body? Furthermore, are you getting any additional details in the page inspector \> console log or network tab? Sometime with our ambiguous error messaging, there can be clues or context there. Not always, but sometimes 😉

Hey, @Sjardo @miljkovicmisa, do you have any additional thoughts here?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![Sjardo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sjardo/32/52178_2.png) [@Sjardo](https://community.hubspot.com/u/Sjardo)\
**Post date:** [August 29, 2022, 7:00pm UTC](https://community.hubspot.com/t/internal-error-on-contacts-merge/63889/3 "2022-08-29T19:00:49Z")

</div>

Hi,

Sadly, I have no knowledge about this 😅 Tho, it sounds like something is wrong with the loop you are going trough.

Best
