pro: Print the response code if it's an error

This commit is contained in:
Sam Atkins 2022-10-07 17:29:07 +01:00 committed by Andreas Kling
commit 53b7edd5b9
Notes: sideshowbarker 2024-07-17 20:58:35 +09:00

View file

@ -300,6 +300,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
} else {
following_url = false;
if (status_code_value >= 400)
warnln("Request returned error {}", status_code_value);
}
};
request->on_finish = [&](bool success, auto) {