Skip to content

Commit 1aa9276

Browse files
committed
added test for describe on connection with static credentials
1 parent 8d9b8e4 commit 1aa9276

File tree

3 files changed

+267
-203
lines changed

3 files changed

+267
-203
lines changed

internal/credentials/access_error.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package credentials
22

33
import (
4+
"errors"
45
"fmt"
56
"io"
67
"reflect"
@@ -103,7 +104,7 @@ func AccessError(msg string, err error, opts ...authErrorOption) error {
103104
}
104105
buffer.WriteString("): %w")
105106

106-
return xerrors.WithStackTrace(fmt.Errorf(buffer.String(), err), xerrors.WithSkipDepth(1))
107+
return xerrors.WithStackTrace(xerrors.Join(errors.New(buffer.String()), err), xerrors.WithSkipDepth(1))
107108
}
108109

109110
func IsAccessError(err error) bool {

internal/xerrors/operation.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ func (e *operationError) Type() Type {
181181
Ydb.StatusIds_UNDETERMINED,
182182
Ydb.StatusIds_SESSION_EXPIRED:
183183
return TypeConditionallyRetryable
184+
case Ydb.StatusIds_UNAUTHORIZED:
185+
return TypeNonRetryable
184186
default:
185187
return TypeUndefined
186188
}

0 commit comments

Comments
 (0)