go-sentry-api
go-sentry-api copied to clipboard
json: cannot unmarshal bool into Go struct field Event.metadata of type string
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]stringjson:"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"