Skip to content

Commit b9c3900

Browse files
committed
chore: use FailedPrecondition when missing credential
Signed-off-by: Marco Nenciarini <[email protected]>
1 parent 710384f commit b9c3900

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/cnpgi/common/errors.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package common
22

33
import (
4-
"fmt"
5-
64
"google.golang.org/grpc/codes"
75
"google.golang.org/grpc/status"
86
)
@@ -15,7 +13,8 @@ var ErrEndOfWALStreamReached = status.Errorf(codes.OutOfRange, "end of WAL reach
1513
// the object storage.
1614
// This will be fixed by the reconciliation loop in the
1715
// operator plugin.
18-
var ErrMissingPermissions = fmt.Errorf("no permission to download the backup credentials, retrying")
16+
var ErrMissingPermissions = status.Errorf(codes.FailedPrecondition,
17+
"no permission to download the backup credentials, retrying")
1918

2019
// newWALNotFoundError returns a error that states that a
2120
// certain WAL file has not been found. This error is

0 commit comments

Comments
 (0)