intercom-java icon indicating copy to clipboard operation
intercom-java copied to clipboard

Contact.update() doesn't work

Open aonurozcan opened this issue 4 years ago • 2 comments

Please use the following template to submit your issue. Following this template will allow us to quickly investigate and help you with your issue. Please be aware that issues which do not conform to this template may be closed.

For feature requests please contact us at [email protected]

Version info

  • intercom-java version: 2.8.2
  • Java version: 11

Expected behavior

Contact.update() should update the contact

Actual behavior

It gives error with the following message A contact matching those details already exists with id=XXXXXXXXXX

Steps to reproduce

  1. Find a contact with Contact.find()
  2. Change some of it's fields
  3. Update contact with Contact.update()

Logs

aonurozcan avatar Dec 21 '21 21:12 aonurozcan

this could be related to this long-pending fix https://github.com/intercom/intercom-java/pull/287#issuecomment-1307726958

narenlog avatar Nov 09 '22 05:11 narenlog

It looks to me that Contact.update() is using a POST request while the api expects a PUT for updates and POST for creations, hence error.

tbrowncomp avatar May 18 '23 14:05 tbrowncomp