Skip to content

Commit

Permalink
vcenterreceiver client error not found check uses errors.As
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKurek committed May 16, 2024
1 parent 43d5611 commit d12e4d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion receiver/vcenterreceiver/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package vcenterreceiver // import "github.com/open-telemetry/opentelemetry-colle

import (
"context"
"errors"
"fmt"
"net/url"

Expand Down Expand Up @@ -240,7 +241,8 @@ func (vc *vcenterClient) VAppInventoryListObjects(ctx context.Context) ([]*objec
return vApps, nil
}

if _, ok := err.(*find.NotFoundError); ok {
var notFoundErr *find.NotFoundError
if errors.As(err, &notFoundErr) {
return []*object.VirtualApp{}, nil
}

Expand Down

0 comments on commit d12e4d8

Please sign in to comment.