diff --git a/VirtoCommerce.LiquidThemeEngine/ShopifyLiquidThemeEngine.cs b/VirtoCommerce.LiquidThemeEngine/ShopifyLiquidThemeEngine.cs index 39933d1f4..918f5029a 100644 --- a/VirtoCommerce.LiquidThemeEngine/ShopifyLiquidThemeEngine.cs +++ b/VirtoCommerce.LiquidThemeEngine/ShopifyLiquidThemeEngine.cs @@ -216,6 +216,10 @@ public string GetAssetHash(string filePath) using (var stream = GetAssetStream(filePath)) { + if (stream == null) + { + throw new StorefrontException($"Theme resource for path '{filePath}' not found"); + } var hashAlgorithm = CryptoConfig.AllowOnlyFipsAlgorithms ? (SHA256)new SHA256CryptoServiceProvider() : new SHA256Managed(); return WebEncoders.Base64UrlEncode(hashAlgorithm.ComputeHash(stream)); }