diff --git a/monitoring.go b/monitoring.go index c284f409f..60ba93874 100644 --- a/monitoring.go +++ b/monitoring.go @@ -411,7 +411,9 @@ func (sc *snowflakeConn) rowsForRunningQuery( } return err } - if !resp.Success { + // the result response sometimes contains only Data and not anything else. We parse the error code only + // if it's set in the response + if !resp.Success && resp.Code != "" { message := resp.Message code, err := strconv.Atoi(resp.Code) if err != nil {