1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +00:00

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
parent 9b891a423b
commit 53b7edd5b9

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) {