Requested transaction failed due to version mismatch

Hi All,

I hope you’re doing great! I encountered an error message in Freshsales that said, “Requested contact’s version doesn’t match. The current version is 15.” However, I’m unsure about what this message exactly means and how to proceed.

Could you please provide some clarification or guidance on how to resolve this issue? Any assistance or insights would be greatly appreciated.

Thank you for your help!

Hi @karups

Welcome to the Freshworks developer community!

Can you please elaborate on when exactly you encounter this issue? Understanding whether it happens while using the custom application or the REST API would provide more clarity and help us address the issue more effectively.

Thanks & Regards,
Gopi

Thanks for the response.

We just to update one of the custom field value in freshsales suite using this endpoint ‘/crm/sales/api/contacts/1’.

Followed by the screen shot for your reference.

Note: The update API call would be triggered max above 50 requests per minute.

Thanks.

Hi @karups

Please verify the API version of the endpoint you are using and test it with Postman to see if you encounter the same error.

It worked in postman,

Note: The error was not occurred frequently

The documentation link above based on to updating the value in a custom field for a specific contact.
I did not get what you mean by the API version of the endpoint, I have not seen any API version in the documentation as you mentioned.

Thanks.

Hi @karups

If it’s functioning in Postman, it should also work within the app. Can you please provide the code snippet for your request template.

Hi @Gopi ,

Thanks for the support.

Followed by the code snippet is below:

function updateContact(contact_arr, dLog) {
  const contactPayload = JSON.stringify({
    contact: contact_arr.data,
  });
  $request
    .invokeTemplate("updateContact", {
      body: contactPayload,
      context: {
        id: contact_arr.id
      }
    })
    .then(
      () => {
        dLog("External calendar link updated successfully!.");
      },
      (err) => {
        dLog("External calendar link err :", err);
        dLog(contactPayload)
      }
    );
}

Payload is:
{"contact":{"custom_field":{"cf_external_calendar_link":"https://calendar-frontend.addisonlee-partners.net:3000/?email=okikiaya@gmail.com\“}}}”

Error is:
Message: Requested contact’s version doesn’t match. The current version is 15.
Status code: 400

The above error message was throwed by freshworks server when update the calendar link in the custom field for a contact.

Let me know the reason behind above the error message.

Thank you.