diff --git a/tiered_cache.go b/tiered_cache.go index 39ac88d3f4..46c00c4ccb 100644 --- a/tiered_cache.go +++ b/tiered_cache.go @@ -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, ¬FoundError) { return TieredCache{Type: TieredCacheOff}, nil } return TieredCache{Type: TieredCacheOff}, err