fix(logs): the browser's copy of a polled read is quiet too
The server now logs polled reads at DEBUG, and the browser's copy of each request line promises the server's level: at INFO the unread-count polls filled My log within minutes and, at Detailed, the shipped log. The server marks a line it logged at DEBUG with X-Log-Quiet, so the polled-route list stays in one place.
This commit is contained in:
@@ -7,7 +7,7 @@ import i18n from "../../i18n";
|
||||
import { formatBytes } from "../format";
|
||||
import { reportError } from "../errorDialog";
|
||||
import { activeAccountId, pinActiveAccount } from "../activeAccount";
|
||||
import { logRequest, REQUEST_ID_HEADER, ROUTE_HEADER, send } from "../http";
|
||||
import { logRequest, QUIET_HEADER, REQUEST_ID_HEADER, ROUTE_HEADER, send } from "../http";
|
||||
import { newRequestId } from "../log";
|
||||
|
||||
/** The active UI language, as a bare code the server understands ("en"/"hu" — never "en-GB").
|
||||
@@ -374,6 +374,7 @@ export function uploadReq<T = unknown>(
|
||||
status: xhr.status,
|
||||
// Test doubles may not implement it; a real XHR always does.
|
||||
route: xhr.getResponseHeader?.(ROUTE_HEADER),
|
||||
quiet: xhr.getResponseHeader?.(QUIET_HEADER) === "1",
|
||||
});
|
||||
if (!RETRIABLE_GATEWAY.has(xhr.status)) markConnectivityRestored(); // as in `req`
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
|
||||
Reference in New Issue
Block a user