File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
modules/importer/src/runner/quay Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -195,18 +195,20 @@ impl<C: RunContext> QuayWalker<C> {
195195 if self . context . is_canceled ( ) . await {
196196 return Err ( Error :: Canceled ) ;
197197 }
198- match ( repo. namespace , repo. name ) {
198+ match ( & repo. namespace , & repo. name ) {
199199 ( Some ( namespace) , Some ( name) ) => {
200- let url = self . importer . repository_url ( & namespace, & name) ;
200+ let url = self . importer . repository_url ( namespace, name) ;
201201 log:: debug!( "Fetching repo {url}" ) ;
202- Ok ( self
203- . client
204- . get ( url)
205- . send ( )
206- . await ?
207- . error_for_status ( ) ?
208- . json ( )
209- . await ?)
202+ let result = match self . client . get ( & url) . send ( ) . await ?. error_for_status ( ) {
203+ Ok ( response) => response. json ( ) . await ?,
204+ Err ( err) => {
205+ log:: warn!( "Error fetching repo {url}: {err}" ) ;
206+ let mut report = self . report . lock ( ) . await ;
207+ report. add_error ( Phase :: Retrieval , url, err. to_string ( ) ) ;
208+ repo
209+ }
210+ } ;
211+ Ok ( result)
210212 }
211213 _ => Err ( Error :: Processing ( anyhow ! (
212214 "Repository name and namespace are required"
You can’t perform that action at this time.
0 commit comments