Skip to content

Commit

Permalink
Fixed decodeContent not returning an error when failing to unmarshal …
Browse files Browse the repository at this point in the history
…JSON
  • Loading branch information
TheRockettek committed Jan 24, 2024
1 parent a9cf663 commit b081686
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/sandwich.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
)

// VERSION follows semantic versioning.
const VERSION = "1.9"
const VERSION = "1.9.1"

const (
PermissionsDefault = 0o744
Expand Down
2 changes: 2 additions & 0 deletions internal/shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ func (sh *Shard) decodeContent(msg discord.GatewayPayload, out interface{}) erro
err := jsoniter.Unmarshal(msg.Data, &out)
if err != nil {
sh.Logger.Error().Err(err).Str("type", msg.Type).Msg("Failed to decode event")

return err
}

return nil
Expand Down

0 comments on commit b081686

Please sign in to comment.