Skip to content

Commit

Permalink
fix(kumactl): treat 404 as resource not found error (#7297)
Browse files Browse the repository at this point in the history
Signed-off-by: slonka <slonka@users.noreply.github.com>
  • Loading branch information
slonka authored Jul 19, 2023
1 parent 7f5680d commit 3d5e970
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/plugins/resources/remote/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ func (s *remoteStore) Get(ctx context.Context, res model.Resource, fs ...store.G
return err
}
statusCode, b, err := s.doRequest(ctx, req)
if statusCode == 404 {
return store.ErrorResourceNotFound(res.Descriptor().Name, opts.Name, opts.Mesh)
}
if err != nil {
if statusCode == 404 {
return store.ErrorResourceNotFound(res.Descriptor().Name, opts.Name, opts.Mesh)
}
return err
}
if statusCode != 200 {
Expand Down

0 comments on commit 3d5e970

Please sign in to comment.