Skip to content

Commit

Permalink
Use type print instead of string in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
EwenQuim committed Oct 24, 2024
1 parent 8143a41 commit 3f46b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ var SendJSON = func(w http.ResponseWriter, _ *http.Request, ans any) error {
if errors.As(err, &unsupportedType) {
return NotAcceptableError{
Err: err,
Detail: fmt.Sprintf("Cannot serialize type %s to JSON", unsupportedType.Type),
Detail: fmt.Sprintf("Cannot serialize type %T to JSON", ans),
}
}
}
Expand Down

0 comments on commit 3f46b5f

Please sign in to comment.