diff --git a/src/net/http.zig b/src/net/http.zig index 2679ecd..cbd38fa 100644 --- a/src/net/http.zig +++ b/src/net/http.zig @@ -395,7 +395,22 @@ pub const Client = struct { // sees the mapped HttpError variant // (`Unauthorized`, `RateLimited`, ...) and has no // path back to the upstream's reason. - log.warn("http rejection body status={d} body={s}", .{ @intFromEnum(response.status), response.body }); + // + // 404s are noisy in normal operation: callers + // routinely encounter "no data" 404s for symbols + // EDGAR doesn't track, money-market funds with no + // NPORT-P, ETFs with no shares-outstanding XBRL, + // etc. The body of a 404 is usually a generic + // "NoSuchKey" / "Not Found" XML/HTML page that + // tells the operator nothing actionable. Demote + // those to debug so the warn-level log stream + // stays focused on cases the operator can act on + // (auth, rate, server outages). + if (response.status == .not_found) { + log.debug("http rejection body status=404 body={s}", .{response.body}); + } else { + log.warn("http rejection body status={d} body={s}", .{ @intFromEnum(response.status), response.body }); + } response.allocator.free(response.body); if (response.etag) |e| response.allocator.free(e); return switch (response.status) {