File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 133133 if ( ! response . IsSuccessStatusCode )
134134 throw new InvalidOperationException ( $ "Failed to fetch open source data: { response . StatusCode } ") ;
135135
136- var oss = await JsonSerializer . DeserializeAsync < OpenSource > ( response . Content . ReadAsStream ( ) , JsonOptions . Default ) ;
137-
138- if ( oss is null )
139- throw new InvalidOperationException ( "Failed to deserialize open source data." ) ;
136+ var oss = await JsonSerializer . DeserializeAsync < OpenSource > ( response . Content . ReadAsStream ( ) , JsonOptions . Default )
137+ ?? throw new InvalidOperationException ( "Failed to deserialize open source data." ) ;
140138
141139 return oss ;
142140 } ) ) ;
143141
144142 } )
145- . ConfigureGitHubWebhooks ( new ConfigurationBuilder ( ) . Configure ( ) . Build ( ) [ "GitHub:Secret" ] )
143+ . ConfigureGitHubWebhooks ( config => config [ "GitHub:Secret" ] ?? throw new ArgumentException ( "Missing GitHub:Secret configuration" ) )
146144 . Build ( ) ;
147145
148146host . Run ( ) ;
You can’t perform that action at this time.
0 commit comments