chore: use FailedPrecondition when missing credential

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
Marco Nenciarini 2025-09-24 17:06:50 +02:00
parent 0a3eb16d7b
commit 37b4aa9214

View File

@ -1,8 +1,6 @@
package common
import (
"fmt"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@ -15,7 +13,8 @@ var ErrEndOfWALStreamReached = status.Errorf(codes.OutOfRange, "end of WAL reach
// the object storage.
// This will be fixed by the reconciliation loop in the
// operator plugin.
var ErrMissingPermissions = fmt.Errorf("no permission to download the backup credentials, retrying")
var ErrMissingPermissions = status.Errorf(codes.FailedPrecondition,
"no permission to download the backup credentials, retrying")
// newWALNotFoundError returns a error that states that a
// certain WAL file has not been found. This error is