Skip to content

Commit 69fed6b

Browse files
authored
Merge pull request #70 from veqryn/veqryn/return-aws-error
Return aws error early if not: workgroup not found
2 parents 572dd0c + 7037f37 commit 69fed6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/connection.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ func (c *Connection) QueryContext(ctx context.Context, query string, namedArgs [
342342
if err != nil {
343343
obs.Scope().Counter(DriverName + ".failure.querycontext.getwg").Inc(1)
344344
obs.Log(WarnLevel, "Didn't find workgroup "+wg.Name+" due to: "+err.Error())
345+
if reqerr, ok := err.(awserr.RequestFailure); !ok || reqerr.Message() != "WorkGroup is not found." {
346+
return nil, err
347+
}
345348
if c.connector.config.IsWGRemoteCreationAllowed() {
346349
err = wg.CreateWGRemotely(c.athenaAPI)
347350
if err != nil {

0 commit comments

Comments
 (0)