- Polling pauses while the Mac sleeps or is locked. On wake, unlock or panel open, sources refresh if due.
- Failures back off with repeated attempts, capped at 30 minutes or the configured interval if that is longer. They never shorten that interval. A success returns to the normal schedule.
- An answer can count as a failure too, when the service reports an error inside it: see
fail. - A data request gives up after 10 seconds without data, or 20 seconds in all, and has a 1 MB response limit, enforced while the answer downloads: Legato stops reading at 1 MB. Redirects must keep the same scheme, host and effective port.
- Before the first answer, a card shows what it is waiting for or an error. Later failures keep the last good value and add an error line. The footer shows the newest successful update on the page, so also check individual card errors.
- To read a page's sources again without waiting, click the arrow left of the pin at the top of the panel (⌘R). A server's cooldown still holds.
- macOS may ask for local-network access the first time Legato reaches a local service.
When a service stops answering
A failed fetch keeps each card's last answer, with the error under it, so one dropped request doesn't blank a page. A service that has stopped answering for good would therefore stay green. Give the status card that stands for the service failed, and after a few failures in a row it says so:
{ "id": "host", "type": "status", "label": "pve-lab", "state": "ok",
"source": { "ref": "pve", "map": { "detail": "data.pveversion" },
"failed": { "state": "critical", "detail": "Proxmox isn't answering", "after": 3 } } }- The card takes that state and detail and notifies, as any status change does. Without
detailit says "Not answering since 2:14 PM" (or "Not answering" when the source never answered). - The next answer puts the card back to what the answer says.
aftercounts failed fetches, which back off (see above): witheveryof1m, the third comes about 3 minutes after the first. Polling pauses while the Mac sleeps, so this tells you about the service only while the Mac is awake; for a service that must be watched around the clock, use a monitor such as Uptime Kuma as well.- It applies before
when, so a card that shows on a condition still shows when its source fails. - A
fleettakesfailedtoo. Its items can't say how they stand while the source is silent, so the fleet shows one dot in their place, named by the card's label ("Server"), with that state and detail: it lights the page and notifies once, not once per item. - A rate limit or a refused secret counts as a failure too: the card can't say what the service is doing.
- So does an answer the source's
failturns down. Withoutdetail, the card then says "Reporting an error since 2:14 PM", since the service is answering.
When the answer reports an error
Some services answer HTTP 200 even when the request went wrong, and say so in the body: GraphQL APIs send an errors list, others success: false. Legato would take that as an answer, and the cards would show dashes. Give the source fail, and such an answer counts as a failed fetch:
"sources": { "gh": { "url": "https://api.github.com/graphql", "method": "POST", "secret": "github", "body": { "query": "{ viewer { login } }" },
"fail": { "when": { "path": "errors", "exists": true }, "message": "errors[0].message" } } }whenis a condition, checked on the answer afterderive, so it can test a derived value.allandanycombine tests.- Test that the error is there with
exists. Any other test whose path is missing or null doesn't hold here, whatever it compares, so an answer withouterrorspasses;equals: nullnever fires. messageis a rule for the service's reason. The note under the cards is "api.github.com reported an error: Bad credentials", on one line and cut at 200 characters, or "api.github.com reported an error" when there's nomessageor it gives nothing.- It's then exactly a failed request: each card keeps its last answer with the note, polling backs off, a status card's
failedcounts it, and History and sparkline readings keep nothing from it. A rate limit the response's headers announce still holds. failgoes insources.<name>, since it decides for every card on the source; a card'sfailedsays what one status card shows after several failures. Only HTTP sources take it: calendars, reminders and History are read on this Mac.- Adding
failto a source that collects keeps its history as it is: the same rows and the same history in Settings → History. - Preview Source shows an answer that
failturns down, with the reason above the cards. - A GraphQL answer can carry data and errors together, such as one repository it couldn't read in a list of twenty. A rule on
errorsalone then holds the whole page on its last answer. Fail only when something every good answer has is missing:{ "all": [ { "path": "errors", "exists": true }, { "path": "data.viewer.repositories", "exists": false } ] }.
| Service | fail |
|---|---|
| GitHub GraphQL, Linear | { "when": { "path": "errors", "exists": true }, "message": "errors[0].message" } |
| Cloudflare | { "when": { "path": "success", "equals": false }, "message": "errors[0].message" } |
| Parcel | { "when": { "path": "success", "equals": false }, "message": "error_message" } |
| Tautulli | { "when": { "path": "response.result", "not": "success" }, "message": "response.message" } |
| SABnzbd | { "when": { "path": "status", "equals": false }, "message": "error" } |
With named requests, the path starts with the request's name: gql.errors[0].message, or { "any": [ … ] } over several.
Rate limits and unchanged responses
- Server-requested waits. Legato honors
Retry-Afteras seconds or an HTTP date on HTTP 429, on 503 when it carriesRetry-After, and on 403 responses carrying rate-limit signals. A 503 withoutRetry-Afteris an ordinary failure and backs off as usual. Ordinary permission-denied 403 responses are treated as errors, not quota signals. A recognized rate-limit refusal without a usable deadline waits at least 60 seconds. - Exhausted quotas. When
X-RateLimit-RemainingorRateLimit-Remainingreaches 0, Legato waits for the matchingX-RateLimit-ResetorRateLimit-Reset. Services send that in different forms, and Legato reads any of them: a delay in seconds, a Unix timestamp (any number from 1,000,000,000 up), an HTTP date or an ISO 8601 date. A successful response can therefore postpone the next poll too. Where several hints apply, Legato keeps the latest deadline, but no hint holds a source back for more than 24 hours. - Shared waits. Sources using the same origin and configured credentials share the cooldown. Polling, Fetch Once and buttons respect it; an early request shows when it can try again. Rate-limited button and checklist-row commands are never replayed automatically. After the wait, click the button or tick the row again if you still want the action.
- Conditional GETs. For eligible GET requests, Legato retains the response and its ETag or Last-Modified validator in memory. A later request sends
If-None-MatchorIf-Modified-Since; HTTP 304 reuses that response and reevaluates the current mappings and derived values. It does not fetch a full body again. - Cache boundaries. POST reads and button requests are not cached. Cached responses are separated by URL and request headers, including authentication; changing credentials does not reuse another credential's data.
no-storeandVary: *prevent storage. This is not an offline cache: reuse requires a server's 304 response, and the cache is lost when the app closes.