Skip to content

Commit 4f44ebf

Browse files
authored
GODRIVER-2046 Return clearer error when truncating a float64 to float32 without the truncate tag (#1448)
1 parent 99bdb94 commit 4f44ebf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bson/bsoncodec/default_value_decoders.go

Lines changed: 1 addition & 1 deletion
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)