mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-08 12:56:23 +03:00
LibWeb: Log failed Fetch responses when WEB_FETCH_DEBUG is enabled
We do the same for successful responses. Very useful for debugging issues on live websites.
This commit is contained in:
parent
eb0d56a4ed
commit
7681772b9f
Notes:
sideshowbarker
2024-07-18 00:41:35 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/7681772b9f Pull-request: https://github.com/SerenityOS/serenity/pull/23574
@ -1779,6 +1779,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> nonstandard_resource_load
|
||||
},
|
||||
[&realm, &vm, request, pending_response](auto& error, auto status_code, auto data, auto& response_headers) {
|
||||
dbgln_if(WEB_FETCH_DEBUG, "Fetch: ResourceLoader load for '{}' failed: {} (status {})", request->url(), error, status_code.value_or(0));
|
||||
if constexpr (WEB_FETCH_DEBUG)
|
||||
log_response(status_code, response_headers, data);
|
||||
auto response = Infrastructure::Response::create(vm);
|
||||
// FIXME: This is ugly, ResourceLoader should tell us.
|
||||
if (status_code.value_or(0) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user