Skip to content

Commit

Permalink
print response.Data before panicking when invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
vbmithr committed Oct 17, 2024
1 parent f9eac5c commit d2994a1
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 d2994a1

Please sign in to comment.