Skip to content

Commit b9f91e5

Browse files
committed
ignore 429's when linkcheck
1 parent 968b2a3 commit b9f91e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/rustbook/src/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ pub fn linkcheck(
108108
is_real_error = true;
109109
}
110110
Reason::UnsuccessfulServerResponse(status) => {
111-
if status.is_client_error() {
111+
if status.as_u16() == 429 {
112+
eprintln!("Received 429 (TOO_MANY_REQUESTS) for link `{}`", link.link.uri);
113+
} else if status.is_client_error() {
112114
is_real_error = true;
113115
} else {
114116
eprintln!("Unsuccessful server response for link `{}`", link.link.uri);

0 commit comments

Comments
 (0)