All error codes

window_too_large

HTTP 422 Requested time window is too large

What happened

The cost window you asked for on GET /v1/project/costs, GET /v1/project/costs/servers or GET /v1/account/costs is wider than 400 days. On GET /v1/account/costs it is also refused when the projects hold more than about 100000 usage records in the window (a window left out counts as the last 32 days) - the detail names the estimate and the number of projects. The request is refused rather than truncated, because a bucket silently dropped from the answer reads as "no spend" to a reconciliation tool.

What to do

Narrow start and end to 400 days or less, and read longer histories with several calls. On the account costs you can also read fewer projects at a time with label. If the window itself fits but the breakdown produces too many rows you get granularity_too_fine instead - coarsen granularity there rather than shrinking the window.

Retrying

Fix the request and send it again.

How it arrives

{
    "type": "https://docs.fiberax.com/errors/window_too_large",
    "title": "Requested time window is too large",
    "status": 422,
    "code": "window_too_large",
    "request_id": "a277dcd1ca652c65"
}

Branch your code on code, never on the wording of title.