Skip to content

Commit

Permalink
swap string check for HTTP request error check
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Dec 22, 2022
1 parent 438ff78 commit 4266c4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tiered_cache.go
Expand Up @@ -173,7 +173,8 @@ func getSmartTieredCache(api *API, ctx context.Context, rc *ResourceContainer) (
uri := fmt.Sprintf("/zones/%s/cache/tiered_cache_smart_topology_enable", rc.Identifier)
res, err := api.makeRequestContext(ctx, http.MethodGet, uri, nil)
if err != nil {
if err.Error() == notFoundError {
var notFoundError *NotFoundError
if errors.As(err, &notFoundError) {
return TieredCache{Type: TieredCacheOff}, nil
}
return TieredCache{Type: TieredCacheOff}, err
Expand Down

0 comments on commit 4266c4c

Please sign in to comment.