File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ pub struct GithubTree {
46
46
#[ derive( Debug , Deserialize ) ]
47
47
pub struct RestRepository {
48
48
pub id : usize ,
49
- #[ allow( unused, reason = "Useful for debugging, if something does go wrong" ) ]
49
+ // Useful for debugging, if something does go wrong
50
+ #[ allow( unused) ]
50
51
pub full_name : String ,
51
52
pub node_id : String ,
52
53
pub fork : bool ,
@@ -56,6 +57,7 @@ pub struct RestRepository {
56
57
struct GraphResponse < T > {
57
58
data : Option < T > ,
58
59
errors : Option < Vec < GitHubError > > ,
60
+ #[ allow( unused) ]
59
61
message : Option < String > ,
60
62
}
61
63
@@ -183,7 +185,14 @@ impl Github {
183
185
let data: GraphResponse < T > = handle_response_json ( resp) . await ?;
184
186
185
187
if let Some ( errs) = data. errors {
186
- warn ! ( "GraphQL Errors: {:?}, \n {:#?}" , data. message, errs) ;
188
+ let errs: Vec < _ > = errs
189
+ . into_iter ( )
190
+ // Some repos on GitHub are just marked as NOT_FOUND, does not seem like our fault
191
+ . filter ( |el| el. r#type . as_deref ( ) != Some ( "NOT_FOUND" ) )
192
+ . collect ( ) ;
193
+ if !errs. is_empty ( ) {
194
+ warn ! ( "GraphQL Errors: \n {:#?}" , errs) ;
195
+ }
187
196
}
188
197
189
198
data. data . ok_or_else ( || Error :: EmptyData )
You can’t perform that action at this time.
0 commit comments