Metrics Window Out Of Range

metrics-window-out-of-range · 400

An operator asked a metrics route for a window it doesn't scan, so the API computed nothing.

Metrics are read by Ghaym's operators through the admin routes. A window is a whole number of hours or days, such as 48h or 30d, from 1 hour up to maxWindowHours, 8,760 hours or 365 days. Without one, the route reads 30d.

Besides the members every error carries, this type adds window and maxWindowHours.

Common causes

  • The window is longer than 365 days, such as 400d.
  • The window is shorter than an hour, such as 0h.

How to fix the call

  • Ask for a window of at most 365d, in h or d.
  • Leave the window out to read the last 30 days.

Example response

json
{
  "type": "metrics-window-out-of-range",
  "title": "Metrics Window Out Of Range",
  "detail": "A window of '400d' is longer than the 8760h (365d) maximum this endpoint scans. Ask for a shorter window.",
  "window": "400d",
  "maxWindowHours": 8760,
  "requestId": "req-1785231000000-4f7b2c9ae",
  "timestamp": "2026-07-28T09:30:00.000Z",
  "path": "/v1/admin/metrics/one-shot-rate",
  "method": "GET",
  "instance": "GET /v1/admin/metrics/one-shot-rate",
  "status": 400,
  "docs": "https://ghaym.me/docs/errors/metrics-window-out-of-range"
}