Answered

The requested resource does not exist; check your path and try again

  • 7 May 2024
  • 8 replies
  • 141 views

Intercom::ResourceNotFound • Events::UpdateIntercomLeadWorker@default

The requested resource does not exist; check your path and try again
I am going to save the contacts like this in rails:
@intercom.contacts.save(lead)
i got he above error 
 

def find_lead(lead_id)

begin

@intercom.contacts.find(id: lead_id)

rescue Intercom::ResourceNotFound

return nil

end

end

second one issue I am also facing this issue
@intercom.contacts.find(id: lead_id)
12:59:09 worker_sidekiq.| *** Intercom::UnexpectedError Exception: The error of type '' is not recognized. It occurred with the message: Your current SDK version is incompatible with version 2.10 of the API and http_code: '400'. Please contact Intercom with these details.
 

icon

Best answer by mateusz.leszkiewicz 7 May 2024, 14:34

View original

8 replies

Userlevel 3
Badge +4

Hi jahanzaib, It’s Mat from the Support Engineering Team 😀

It looks like your SDK is outdated. Can you please update SDK of your app to the latest version and check if that will do the trick?
 

hi @mateusz.leszkiewicz can you please help me how we can update the SDK of my app.Regards

Userlevel 3
Badge +4

Sure, which SDK are you using? React, iOS, Android?

You can find suitable instructions in our developer documents here.

Hi there, we are using the unofficial python SDK hosted on your Github https://github.com/intercom/python-intercom and have started encountering this problem since 30 April 2024.

 

The API version we are using is 1.4 which is quite old but the library above does not support newer versions.

 

The error we are seeing occurs as follows:

 

  1. We search for a lead using an email address
  2. If we find a result in step 1 we fetch that lead using the SDK and the ID from above. The SDK issues a GET request to https://api.intercom.io/contacts/<id-of-contact> which returns data and a 200 status code.
  3. Using the lead from step 2 we update the lead with new data using the SDK. This issues a PUT request to https://api.intercom.io/contacts/<id-of-contact> which fails with a 404 status code.

Can you confirm if there is anything that has changed in the intercom API?

Userlevel 3
Badge +4

Hi BradleyK

This is very outdated SDK (6 years since the last commit) and as stated in the Readme file, it is not officially supported anymore.

From what you’ve described, the issue might be appearing due to the fact that it uses outdated API version (current version is 2.11).

I would start looking for an answer to your question there. 😎

Intercom::ResourceNotFound • Events::UpdateIntercomLeadWorker@default

The requested resource does not exist; check your path and try again
I am going to save the contacts like this in rails:
@intercom.contacts.save(lead)
i got he above error 
 

def find_lead(lead_id)

begin

@intercom.contacts.find(id: lead_id)

rescue Intercom::ResourceNotFound

return nil

end

end

second one issue I am also facing this issue
@intercom.contacts.find(id: lead_id)
12:59:09 worker_sidekiq.| *** Intercom::UnexpectedError Exception: The error of type '' is not recognized. It occurred with the message: Your current SDK version is incompatible with version 2.10 of the API and http_code: '400'. Please contact Intercom with these details.
 

Intercom::ResourceNotFound • Events::UpdateIntercomLeadWorker@default

The requested resource does not exist; check your path and try again
I am going to save the contacts like this in rails:
@intercom.contacts.save(lead)
i got he above error 
 

def find_lead(lead_id)

begin

@intercom.contacts.find(id: lead_id)

rescue Intercom::ResourceNotFound

return nil

end

end

second one issue I am also facing this issue
@intercom.contacts.find(id: lead_id)
12:59:09 worker_sidekiq.| *** Intercom::UnexpectedError Exception: The error of type '' is not recognized. It occurred with the message: Your current SDK version is incompatible with version 2.10 of the API and http_code: '400'. Please contact Intercom with these details.
 

@mateusz.leszkiewicz - I’m getting the same error on logger service but I works fine on the production app.

Userlevel 3
Badge +4

Hi ah.sherazkhan

It only confirms that you are using the old version of API syntax that is no longer supported. Please update all your requests to match the latest version of our API, 2.11

@mateusz.leszkiewicz can you please guide me what’s the core reason here as I can see there’s issue while creating the instance of intercom service (I’ve highlighted it with yellow colour) because if the older version is not supported the intercom service shouldn’t work perhaps its working as intended means there’s something else need to look at.

 

Intercom::ResourceNotFound • Events::UpdateIntercomLeadWorker@default
The requested resource does not exist; check your path and try again
Intercom::ResourceNotFound · The requested resource does not exist;

 

class IntercomService

def initialize

@intercom = Intercom::Client.new(token: "#{ Rails.application.credentials.intercom[:access_token] }")

end

 

def update_lead(args)

  my_args = args.with_indifferent_access

  lead = find_lead(my_args[:lead_id])

  registration_info = RegistrationEmails.find(my_args[:id])

 

  if lead.present? && registration_info.present?

    company_name = registration_info.company_name || ""

     company_website = registration_info.company_url || ""

    lead.name = registration_info.full_name.to_s

    lead.custom_attributes = {

    "Company Name": company_name,

    "Company Website": company_website

    }

    @intercom.contacts.save(lead)

    end

end

 

 

Reply