File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
Verify.EmailPreviewServices Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 22<Project >
33 <PropertyGroup >
44 <NoWarn >CS1591;CS0649;NU1608;NU1109</NoWarn >
5- <Version >0.1.1 </Version >
5+ <Version >0.1.2 </Version >
66 <AssemblyVersion >0.1.0</AssemblyVersion >
77 <LangVersion >preview</LangVersion >
88 <PackageTags >Email, Preview, Verify</PackageTags >
Original file line number Diff line number Diff line change 22<Project Sdk =" Microsoft.NET.Sdk" >
33 <PropertyGroup >
44 <TargetFramework >net10.0</TargetFramework >
5+ <!-- remove when ImageMagick is patched https://github.com/advisories/GHSA-q3hc-j9x5-mp9m-->
6+ <NoWarn >$(NoWarn);NU1902</NoWarn >
57 </PropertyGroup >
68 <ItemGroup >
79 <PackageReference Include =" MarkdownSnippets.MsBuild" PrivateAssets =" all" />
Original file line number Diff line number Diff line change @@ -75,13 +75,18 @@ static async Task GetDevicePreviews(EmailPreviewData preview)
7575 await Task . Delay ( 1000 ) ;
7676 var previews = await Service . GetPreviewAsync ( preview . Id ) ;
7777
78- var failed = previews . Previews . SingleOrDefault ( _ => _ . Status == DevicePreviewDataStatus . FAILED ) ;
79- if ( failed != null )
78+ var failed = previews
79+ . Previews
80+ . Where ( _ => _ . Status == DevicePreviewDataStatus . FAILED )
81+ . Select ( _=> _ . DeviceKey )
82+ . ToList ( ) ;
83+ if ( failed . Count > 0 )
8084 {
81- throw new ( $ "Preview failed to generate. DeviceKey : { failed . DeviceKey } ") ;
85+ throw new ( $ "Preview failed to generate. DeviceKeys : { string . Join ( ", " , failed ) } ") ;
8286 }
8387
84- if ( previews . Previews . All ( _ => _ . Status == DevicePreviewDataStatus . SUCCESSFUL ) )
88+ if ( previews . Previews
89+ . All ( _ => _ . Status == DevicePreviewDataStatus . SUCCESSFUL ) )
8590 {
8691 return ;
8792 }
You can’t perform that action at this time.
0 commit comments