Skip to content

Commit 9bfa424

Browse files
committed
Fix auth-service error handling lint issues
1 parent 79b9c5d commit 9bfa424

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

internal/dolthubauth/service_auth.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"crypto/rand"
77
"crypto/sha256"
88
"encoding/hex"
9+
"errors"
910
"fmt"
1011
"net/http"
1112
"strings"
@@ -166,7 +167,7 @@ func verifyServiceRequest(
166167
return ServiceScope{}, ErrServiceUnauthorized
167168
}
168169
if err := nonces.UseServiceNonce(ctx, keyID, nonce, now, timestamp.Add(maxClockSkew)); err != nil {
169-
if err == ErrConflict {
170+
if errors.Is(err, ErrConflict) {
170171
return ServiceScope{}, ErrServiceReplay
171172
}
172173
return ServiceScope{}, err

internal/dolthubauth/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ func (s *PostgresStore) patchMetadataTx(
496496
return nil, err
497497
}
498498
if err := validateMetadata(*meta); err != nil {
499-
return nil, fmt.Errorf("%w: %v", ErrInvalidMetadata, err)
499+
return nil, fmt.Errorf("%w: %w", ErrInvalidMetadata, err)
500500
}
501501

502502
encodedWastelands, err := json.Marshal(meta.Wastelands)

0 commit comments

Comments
 (0)