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

Incorrect type returned from Users endpoint causes library to break

Open erskingardner opened this issue 5 years ago • 5 comments

Because of this change to the Users endpoint (to return multiple users when more than one user exists with the email address) the type returned by the API isn't of the correct type (currently it tries to use the User object) so the library breaks.

erskingardner avatar May 07 '19 12:05 erskingardner

@erskingardner @jonnyom Are there any plans to make a version of this lib that is compatible with v1.4 of the API?

jonbretman avatar Nov 18 '19 21:11 jonbretman

Hey @jonbretman thanks for reaching out.

I'm afraid our contributors with Go expertise are a bit thin on the ground at the moment. Feel free to submit a PR to the SDK if you've the time though!

jonnyom avatar Nov 20 '19 09:11 jonnyom

I'd like to try this out. Pls assign it to me :) @jonnyom

ruzaikr avatar Dec 09 '19 07:12 ruzaikr

Absolutely @ruzaikr ! Sorry for the delay, I've been OOO 😄 let me know if we can help 👍

jonnyom avatar Jan 02 '20 11:01 jonnyom

Hi,

I'm trying to retrieve a user with an email, but when there isn't a user with the exact email, a list is returned by the API. This causes the SDK to return an empty User struct, which is not useful. I think the function should return a 404 error.

Thanks

catalogplus avatar Jul 07 '22 14:07 catalogplus