Skip to content

Commit

Permalink
print response.Data before panicking when invalid (#3334)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbmithr authored Oct 22, 2024
1 parent abc7c61 commit 4fc657f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql/handler/transport/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
func writeJson(w io.Writer, response *graphql.Response) {
b, err := json.Marshal(response)
if err != nil {
panic(err)
panic(fmt.Errorf("unable to marshal %s: %w", string(response.Data), err))
}
w.Write(b)
}
Expand Down

0 comments on commit 4fc657f

Please sign in to comment.