File tree 1 file changed +16
-13
lines changed
1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -230,20 +230,23 @@ impl Client {
230
230
231
231
let res = self . client . get ( url) . send ( ) . await ?;
232
232
233
- if res. status ( ) . is_success ( ) {
234
- if let Some ( warg_url) = res
235
- . json :: < WellKnownConfig > ( )
236
- . await
237
- . map_err ( |_| {
238
- ClientError :: InvalidWellKnownConfig ( self . url . registry_domain ( ) . to_string ( ) )
239
- } ) ?
240
- . warg_url
241
- {
242
- Ok ( Some ( RegistryUrl :: new ( warg_url) ?) )
243
- } else {
244
- Ok ( None )
245
- }
233
+ if !res. status ( ) . is_success ( ) {
234
+ tracing:: debug!( "the `.well-known` config was not found" ) ;
235
+ return Ok ( None ) ;
236
+ }
237
+
238
+ if let Some ( warg_url) = res
239
+ . json :: < WellKnownConfig > ( )
240
+ . await
241
+ . map_err ( |e| {
242
+ tracing:: debug!( "parsing `.well-known` config failed: {e}" ) ;
243
+ ClientError :: InvalidWellKnownConfig ( self . url . registry_domain ( ) . to_string ( ) )
244
+ } ) ?
245
+ . warg_url
246
+ {
247
+ Ok ( Some ( RegistryUrl :: new ( warg_url) ?) )
246
248
} else {
249
+ tracing:: debug!( "the `.well-known` config did not have a `wargUrl` set" ) ;
247
250
Ok ( None )
248
251
}
249
252
}
You can’t perform that action at this time.
0 commit comments