From 1663004c68d1e05819772e3b57951e153680107e Mon Sep 17 00:00:00 2001 From: David Szmolka <69192509+sfc-gh-dszmolka@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:29:41 +0100 Subject: [PATCH] Snow 1859664 add raiseputgeterror example to doc (#1281) --- doc.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc.go b/doc.go index f800f8070..221491d98 100644 --- a/doc.go +++ b/doc.go @@ -1303,5 +1303,16 @@ Using custom configuration for PUT/GET: If you want to override some default configuration options, you can use `WithFileTransferOptions` context. There are multiple config parameters including progress bars or compression. + +# Surfacing errors originating from PUT and GET commands + +Default behaviour is to propagate the potential underlying errors encountered during executing calls associated with the PUT or GET commands to the caller, for increased awareness and easier handling or troubleshooting them. + +The behaviour is governed by the `RaisePutGetError` flag on `SnowflakeFileTransferOptions` (default: `true`) + +If you wish to ignore those errors instead, you can set `RaisePutGetError: false`. Example snippet: + + ctx := WithFileTransferOptions(context.Background(), &SnowflakeFileTransferOptions{RaisePutGetError: false}) + db.ExecContext(ctx, "PUT ...") */ package gosnowflake