Skip to content

Commit

Permalink
fix: return error from the underlying writer. Fixes segmentio#139
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Oct 5, 2024
1 parent 4747240 commit 09fc996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ func (enc *Encoder) Encode(v interface{}) error {
}

encoderBufferPool.Put(buf)
return err
return enc.err
}

// SetEscapeHTML is documented at https://golang.org/pkg/encoding/json/#Encoder.SetEscapeHTML
Expand Down

0 comments on commit 09fc996

Please sign in to comment.