This is a template you can use to report issues. You can also drag images, videos and include Preformatted text
Expected behavior
Getting this error for the past few weeks in reagrds to Intercom integration:
[forest] 

Internal error while retrieving Intercom attributes: Cannot read property ‘location’ of undefined
TypeError: Cannot read property ‘location’ of undefined
at _callee$ (/Users/liamcheung/development/forest-map/node_modules/forest-express/dist/integrations/intercom/services/attributes-getter.js:38:36)
Failure Logs
Please include any relevant log snippets, if necessary.
Context
Please provide any relevant information about your setup.
- Package Version:
- Express Version:
- Sequelize Version:
- Database Dialect:
- Database Version:
- Project Name:
Hi Liam,
This is an error happening while you are retrieving the intercom attributes of a record.
At first sight, it seems that you ask to intercom for a contact record that does not exist.
Is it your first use of Intercom or was this working previously?
To go further, can you please share the version described in the “context” section of your message? (with your intercom version too)
1 Like
It did work properly previously and does work in some environments but has errors in others. I am not sure what you mean by “context” section of message?
If I diagnose this, I think this is because of a new column that has started showing up in collection list views called intercom attributes that I cannot get rid of, I created a seperate ticket for that.
What is happening here it in these line:
Where I get an empty array from Intercom. Some users are selectively setup at intercom I think.
Should be pretty common to put some kind of guard around this to check for an empty array.
Ok,
We can (and we have to) return a 404 instead of 500 when intercom does not contain the contact.
I am creating a bug ticket for this.
The “context” section is the following:
Context
Please provide any relevant information about your setup.
- Package Version:
- Express Version:
- Sequelize Version:
- Database Dialect:
- Database Version:
- Project Name:
Please consider updating your dependencies. (Btw it will be mandatory to have the last version with the bugfix).