Skip to content

Commit

Permalink
Update cli/pkg/resourcemanager/get.go
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com>
  • Loading branch information
schoren and danielbdias committed Jun 28, 2023
1 parent e5f8c61 commit df9d7d5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cli/pkg/resourcemanager/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ func (c client) Get(ctx context.Context, id string, format Format) (string, erro
if resp.StatusCode != http.StatusOK {
err := parseRequestError(resp, format)
reqErr, ok := err.(requestError)
if ok {
if reqErr.Code == http.StatusNotFound {
return fmt.Sprintf("Resource %s with ID %s not found", c.resourceName, id), nil
}
if ok && reqErr.Code == http.StatusNotFound {
return fmt.Sprintf("Resource %s with ID %s not found", c.resourceName, id), nil
}

return "", fmt.Errorf("could not Get resource: %w", err)
Expand Down

0 comments on commit df9d7d5

Please sign in to comment.