Skip to content

Commit e01b069

Browse files
maxwellgagnoneywalker
authored andcommitted
Improve error message clarity
1 parent ae0ca66 commit e01b069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/config/resources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (r *ResourceConfig) getCanonicalMemory() (int64, error) {
252252
// math.MaxInt64, it returns an overflow error.
253253
func bytesToMi(bytes float64) (int64, error) {
254254
if bytes < 0 || math.IsNaN(bytes) || math.IsInf(bytes, 0) {
255-
return 0, fmt.Errorf("memory must be >= 0")
255+
return 0, fmt.Errorf("memory must be a valid, finite number >= 0.0 (not NaN or +/-Inf); got %g", bytes)
256256
}
257257
miFloat := bytes / (1024.0 * 1024.0)
258258
if miFloat > float64(math.MaxInt64) {

0 commit comments

Comments
 (0)