Skip to content

Commit 4d5b201

Browse files
committed
no panic
1 parent 8710c45 commit 4d5b201

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/detectors/snowflake/snowflake.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
107107
// Open a connection to Snowflake
108108
db, err := sql.Open("snowflake", uri) // Needs the snowflake driver from gosnowflake
109109
if err != nil {
110-
// sql.Open() only errors if unable to import the snowflake driver, in which case we should panic.
111-
panic(err)
110+
return nil, err
112111
}
113112
defer db.Close()
114113

0 commit comments

Comments
 (0)