2025-11-01 13:36:07: merge [main:a42a15d6d6a2aed3e341bb7f2e283cde097dc334];

This commit is contained in:
txix committed 2025-11-01 13:36:07 +03:00
1 parent b7b9a303ba
commit aff6aefec6
4 files changed
+10 -7

No files matched your search

+4 -3
View File
@@ -3,11 +3,12 @@ package repository
import (
"context"
"fmt"
epb "google.golang.org/genproto/googleapis/rpc/errdetails"
"ispctl/model"
"strings"
"time"
epb "google.golang.org/genproto/googleapis/rpc/errdetails"
"github.com/pkg/errors"
"github.com/txix-open/isp-kit/grpc/apierrors"
"github.com/txix-open/isp-kit/grpc/client"
@@ -150,8 +151,8 @@ func (c Config) handleVariableError(err error, endpoint string) error {
if apiError == nil {
return errors.WithMessagef(err, "call %s", endpoint)
}
switch {
case apiError.ErrorCode == model.ErrCodeVariableNotFound:
switch apiError.ErrorCode {
case model.ErrCodeVariableNotFound:
return model.ErrVariableNotFound
default:
return errors.WithMessagef(err, "call %s", endpoint)