mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
browser: add log info on error
This commit is contained in:
@@ -176,7 +176,15 @@ pub const Page = struct {
|
||||
log.info("GET {any} {d}", .{ self.uri, req.response.status });
|
||||
|
||||
// TODO handle redirection
|
||||
if (req.response.status != .ok) return error.BadStatusCode;
|
||||
if (req.response.status != .ok) {
|
||||
log.debug("{?} {d} {s}\n{any}", .{
|
||||
req.response.version,
|
||||
req.response.status,
|
||||
req.response.reason,
|
||||
req.response.headers,
|
||||
});
|
||||
return error.BadStatusCode;
|
||||
}
|
||||
|
||||
// TODO handle charset
|
||||
// https://html.spec.whatwg.org/#content-type
|
||||
|
||||
Reference in New Issue
Block a user