Skip to content

Commit

Permalink
GODRIVER-2046 Return clearer error when truncating a float64 to float…
Browse files Browse the repository at this point in the history
…32 without the truncate tag (mongodb#1448)

(cherry picked from commit 4f44ebf)
  • Loading branch information
ehershey authored and blink1073 committed Nov 1, 2023
1 parent 9852b9c commit 2dd9e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bson/bsoncodec/default_value_decoders.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

var (
defaultValueDecoders DefaultValueDecoders
errCannotTruncate = errors.New("float64 can only be truncated to an integer type when truncation is enabled")
errCannotTruncate = errors.New("float64 can only be truncated to a lower precision type when truncation is enabled")
)

type decodeBinaryError struct {
Expand Down

0 comments on commit 2dd9e60

Please sign in to comment.