Skip to content

Commit 500ff97

Browse files
committed
Better error propagation
1 parent 46e27b9 commit 500ff97

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

internal/pkg/twitch/gql/operation/channelpointscontext/channelpointscontext.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ func Get(channelLogin string, authToken string) (ChannelPointsContext, error) {
189189
}
190190

191191
var c ChannelPointsContext
192-
err = json.Unmarshal(resp, &c)
192+
if err := json.Unmarshal(resp, &c); err != nil {
193+
return c, fmt.Errorf("error unmarshalling GQL response: %w", err)
194+
}
193195

194196
return c, err
195197
}

0 commit comments

Comments
 (0)