diff --git a/types/utils.go b/types/utils.go index 05dafabf8..bf93473a3 100644 --- a/types/utils.go +++ b/types/utils.go @@ -224,6 +224,9 @@ func IsOverflow(r interface{}) bool { case string: s := strings.ToLower(r) return strings.Contains(s, "overflow") || strings.HasSuffix(s, "out of bound") + case error: + s := strings.ToLower(r.Error()) + return strings.Contains(s, "overflow") || strings.HasSuffix(s, "out of bound") } return false }