Skip to content

Commit 2dd9e60

Browse files
ehersheyblink1073
authored andcommitted
GODRIVER-2046 Return clearer error when truncating a float64 to float32 without the truncate tag (mongodb#1448)
(cherry picked from commit 4f44ebf)
1 parent 9852b9c commit 2dd9e60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bson/bsoncodec/default_value_decoders.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
var (
2626
defaultValueDecoders DefaultValueDecoders
27-
errCannotTruncate = errors.New("float64 can only be truncated to an integer type when truncation is enabled")
27+
errCannotTruncate = errors.New("float64 can only be truncated to a lower precision type when truncation is enabled")
2828
)
2929

3030
type decodeBinaryError struct {

0 commit comments

Comments
 (0)