Fix -o flag

This commit is contained in:
komissarovyv committed 2025-11-01 13:35:00 +03:00
1 parent 915faf6210
commit a42a15d6d6
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)