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

json: cannot unmarshal bool into Go struct field Event.metadata of type string #40

Open
thnk2wn opened this issue Jan 24, 2023 · 0 comments

Comments

@thnk2wn
Copy link

thnk2wn commented Jan 24, 2023

Executing event, err := client.GetProjectEvent(org, project, eventId) returns this error:

json: cannot unmarshal bool into Go struct field Event.metadata of type string

Event metadata appears to be defined as:

Metadata *map[string]string json:"metadata,omitempty"`

Looking at the response, there can be non string data types like this boolean:

"metadata": {
  "display_title_with_tree_label": false
}

This change resolves the error:

Metadata *map[string]interface{} json:"metadata,omitempty"

thnk2wn added a commit to teamjobot/go-sentry-api that referenced this issue Jan 24, 2023
@thnk2wn thnk2wn closed this as completed Jan 24, 2023
@thnk2wn thnk2wn reopened this Jan 24, 2023
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

1 participant