-- Record why an OAuth token stopped working. -- -- A stored token row was treated as "connected", full stop. When the refresh -- token itself goes bad — Google answers invalid_grant, which happens when it -- is revoked, superseded, or (for an OAuth client still in Testing publishing -- status) simply older than seven days — settings still showed Google Tasks as -- connected while every fetch failed in the background. -- -- Persisting the failure lets settings say "reconnect" instead of "connected", -- which is the difference between a five-second fix and not knowing anything -- is wrong. Cleared on the next successful refresh. ALTER TABLE oauth_tokens ADD COLUMN last_error TEXT; ALTER TABLE oauth_tokens ADD COLUMN last_error_at DATETIME;