You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Say in a failed economy answer how long its failure is kept #4171
A failed economy calculation's 502 body is {"status": "error", "message": "...", "result": null}. When a new run can be requested is written only in the message, for example "A new run for this state can be requested 2 minutes after this failure." (#4064). A client that wants to know when to offer Retry has to parse that sentence, which PolicyEngine/policyengine-app-v2#1439 does today.
The stored failure already has an expiry in the runtime cache: 2 minutes for a failed US state or local-area breakdown job, and 30 days for every other failure, including US state failures stored before #4064. Until it expires, every request gets the same failure, and the first request after it submits a new job.
The 502 body should carry that remaining time as a number, read from the cache's own expiry, so clients read a field instead of the message text.
Activity