Skip to main content

I am using the intercom-ruby gem to update all my contacts.

 

I retrieve all my contacts with :

contacts = intercom.contacts.all

Then I try to update all of them (only the last_seen_at field with the date of today) :

contacts.each do |contact|

contact.last_seen_at = date_of_today.to_time

intercom.contacts.save(contact)

end

The issue I have is that everytime it works for a few hundreds of contacts, but at one point it fails with some errors. The error in dev is :

ArgumentError: invalid byte sequence in UTF-8

Caused by:

JSON::ParserError: 859: unexpected token at 'HTTP/1.1 0 Unknown Reason-Phrase

Status: 0

Vary: Accept,Accept-Encoding

The error in prod is :

ETIMEDOUT error

 

The thing is that I have tens of thousands of contacts.

 

Many thanks for your help !

Hey @elliot t​ Racheal from the support engineer team here👋 

 

I can see you're already working with my teammates on this issue. For future viewers it sounds like we are running into a timeout error here due to the request being too large.


Hey @racheal​ many thanks for the follow up, much appreciated.


Reply