Skip to content

Commit

Permalink
Skip secret if row not found (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun-m authored Jun 6, 2024
1 parent 99b29b8 commit 7f0191b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/gateway/services/stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gatewayservices

import (
"context"
"database/sql"

"github.com/beam-cloud/beta9/pkg/auth"
"github.com/beam-cloud/beta9/pkg/common"
Expand Down Expand Up @@ -40,6 +41,10 @@ func (gws *GatewayService) GetOrCreateStub(ctx context.Context, in *pb.GetOrCrea
for _, secret := range in.Secrets {
secret, err := gws.backendRepo.GetSecretByName(ctx, authInfo.Workspace, secret.Name)
if err != nil {
if err == sql.ErrNoRows {
continue // Skip secret if not found
}

return &pb.GetOrCreateStubResponse{
Ok: false,
}, nil
Expand Down

0 comments on commit 7f0191b

Please sign in to comment.