diff --git a/src/prometheus/tiny_httpd_prometheus.ml b/src/prometheus/tiny_httpd_prometheus.ml index dcc19a8b..b1731d5b 100644 --- a/src/prometheus/tiny_httpd_prometheus.ml +++ b/src/prometheus/tiny_httpd_prometheus.ml @@ -200,7 +200,7 @@ let http_middleware (reg : Registry.t) : H.Middleware.t = let elapsed_s = elapsed_us /. 1e6 in Histogram.add h_latency elapsed_s; - if code < 200 || code >= 300 then Counter.incr c_err; + if code < 200 || code >= 400 then Counter.incr c_err; resp response) let add_route_to_server (server : H.t) (reg : registry) : unit =