Closed f2prateek closed 8 years ago
Hi @f2prateek - I can't reproduce this here on v2/, and added a test in https://github.com/intercom/intercom-go/pull/40
Can you provide more detail/logs with user data elided where this is happening? Or contact our team through Intercom.
That's weird I can see it pretty reliably in prod. Maybe I'm on a different version? Here's what I have in my godeps.
{
"ImportPath": "gopkg.in/intercom/intercom-go.v2",
"Comment": "v1.0.0-29-g32eaa76",
I've just changed the type to string in our fork for now so I can't provide a test case, sorry.
It does seem to be that what you have shouldn't work, unless you're doing some custom JSON unmarshalling? http://play.golang.org/p/h4709MOTRq
Figured it out. The test I added ignored the error being returned and the value defaulted to 0. I've just removed the concrete type and reverted to string. Fixed now, thanks!
Version info
Expected behaviour
No Error when retrieving segment information.
Actual behaviour
I'm seeing
json: cannot unmarshal string into Go value of type intercom.SegmentPersonType
Steps to reproduce
Logs
N/A
Verified with curl that the
person_type
is a string, not int: https://cloudup.com/cP7e52yObYM