]> git.lizzy.rs Git - rust.git/commitdiff
ignore 429's when linkcheck
authormark <markm@cs.wisc.edu>
Wed, 8 Apr 2020 04:29:45 +0000 (23:29 -0500)
committermark <markm@cs.wisc.edu>
Wed, 8 Apr 2020 04:29:45 +0000 (23:29 -0500)
src/tools/rustbook/src/main.rs

index 01f324f0c5a0a653057e5c6690d39c274d7bb6a6..60bd0b72910a448c68c8d9d37b7dbfced7c01310 100644 (file)
@@ -108,7 +108,9 @@ pub fn linkcheck(
                 is_real_error = true;
             }
             Reason::UnsuccessfulServerResponse(status) => {
-                if status.is_client_error() {
+                if status.as_u16() == 429 {
+                    eprintln!("Received 429 (TOO_MANY_REQUESTS) for link `{}`", link.link.uri);
+                } else if status.is_client_error() {
                     is_real_error = true;
                 } else {
                     eprintln!("Unsuccessful server response for link `{}`", link.link.uri);