The error is json: cannot unmarshal object into Go struct field Issue.annotations of type string and if I output the raw JSON from Sentry I can see that some issues have an annotations:[{}](with content inside, not just empty hehe) so basically can also have an object inside.
I can fix this by just doing:
diff --git a/issue.go b/issue.go
index b1986ef..1a83f10 100644
--- a/issue.go
+++ b/issue.go
@@ -82,7 +82,7 @@ type Activity struct {
// Issue returns a issue found in sentry
type Issue struct {
- Annotations *[]string `json:"annotations,omitempty"`
+ Annotations *[]interface{} `json:"annotations,omitempty"`
AssignedTo *InternalUser `json:"assignedTo,omitempty"`
Activity *[]Activity `json:"activity,omitempty"`
Count *string `json:"count,omitempty"`
But when I tried to test it I could not find a way to actually inject the Annotations.
The fix is easy but also it's a change of type so it'll not be backwards compatible also.
What would be the right process to fix this?
The error is
json: cannot unmarshal object into Go struct field Issue.annotations of type stringand if I output the raw JSON from Sentry I can see that some issues have anannotations:[{}](with content inside, not just empty hehe) so basically can also have an object inside.I can fix this by just doing:
But when I tried to test it I could not find a way to actually inject the
Annotations.The fix is easy but also it's a change of type so it'll not be backwards compatible also.
What would be the right process to fix this?