Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetV1Incidents call fails #49

Closed
srikotu opened this issue May 7, 2024 · 2 comments
Closed

GetV1Incidents call fails #49

srikotu opened this issue May 7, 2024 · 2 comments

Comments

@srikotu
Copy link

srikotu commented May 7, 2024

Seems like json unmarshalling is breaking for retro_exports field.

I am trying to make a call to incidents.ClientService.GetV1Incidents(), I am able to get responses for the first page which doesn't have any retro_export objects but it breaks for the second page as soon as it reads the retro_export object.

Below is the error that is returned by the function call:
json: cannot unmarshal object into Go struct field IncidentEntity.data.retro_exports of type string

@wilsonehusin
Copy link
Member

👋🏻 @srikotu thanks for reporting the bug — we've updated the entity type in #58, but looks like you may still need to unmarshal the underlying interface{} to map[string]interface{} with something like mitchellh/mapstructure.

@srikotu
Copy link
Author

srikotu commented May 24, 2024

@wilsonehusin thank you for replying back with the update. I have been able to use the updated spec and it works perfectly.

Thanks for the quick resolution.

@srikotu srikotu closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants