Skip to content

Commit

Permalink
PLT-806: change error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikchern committed Jan 10, 2024
1 parent f378605 commit 2e6ffac
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions client/appliance.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package client

import (
"errors"

"github.com/spectrocloud/hapi/apiutil/transport"
hashboardC "github.com/spectrocloud/hapi/hashboard/client/v1"
"github.com/spectrocloud/hapi/models"
clusterC "github.com/spectrocloud/hapi/spectrocluster/client/v1"
Expand All @@ -25,10 +22,7 @@ func (h *V1Client) SearchApplianceSummaries(applianceContext string, filter *mod
}

resp, err := h.GetHashboardClient().V1DashboardEdgehostsSearch(params)
var e *transport.TransportError
if errors.As(err, &e) && e.HttpCode == 404 {
return nil, nil
} else if err != nil {
if err != nil {
return nil, err
}

Expand Down

0 comments on commit 2e6ffac

Please sign in to comment.