fix(gmail): stop hiding why it failed, twice over
Release / Build and publish image (push) Failing after 10m6s
Release / Build and publish image (push) Failing after 10m6s
Reported from use: "Fetch now" said "something went wrong" and the error log was empty. Both halves were the same bug wearing two hats. `handleGmailSyncNow` answered 502 with the code `internal_error`, which the interface maps to a generic sentence — so Google's own words, which are the whole diagnosis, were replaced by one that says nothing. And `writeError` records nothing; only `s.internal` does. So there was no message to read and nowhere to look it up afterwards. `s.upstream()` is the answer: 502 because this is somebody else's service saying no rather than this server breaking, a code of its own so the interface can quote what was said, and a row in the error log — which is the entire reason that log exists. A Gmail sync failing quietly for a week is otherwise invisible: the background job writes a line the next restart erases. The same connection also left the mailbox unnamed. The address is learned at connect time and that call can fail; a warning went to the log and an empty string to the database, so the page said "an unknown account" and kept saying it. The only way back was to disconnect and reconnect, which nobody would guess. The status endpoint asks again when it finds none, so a wrong answer lasts until the next look rather than until somebody reconnects. Ten Danish strings were hiding in `confirm()` and `app.toast()` calls, including every destructive confirmation in the app — the worst possible set to leave in one language, since it is what somebody reads in the half-second before agreeing to lose something. The i18n guard reads markup and attributes, and a string argument lives in the script block. It reads those now, and found four my own grep missed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
95378a1199
commit
c4e480a0c4
@@ -641,5 +641,24 @@ export const en = {
|
||||
'update.waiting': 'Waiting for the server to come back…',
|
||||
'update.stillDown': 'The server has not come back yet. Have a look in the panel.',
|
||||
'update.notConfigured':
|
||||
'This instance cannot restart itself: {missing} are not set. A container cannot replace its own image — the panel does the work, and this is only the way to ask.'
|
||||
'This instance cannot restart itself: {missing} are not set. A container cannot replace its own image — the panel does the work, and this is only the way to ask.',
|
||||
|
||||
'error.gmailSaid': 'Gmail said: {what}',
|
||||
|
||||
'error.gmailRefused': 'Gmail refused the call. Try connecting the mailbox again.',
|
||||
|
||||
'int.newAddressQuestion': 'A new address? Mail to the old one is refused.',
|
||||
'int.copied': 'Copied.',
|
||||
'int.copyFailed': 'Could not copy — select the text instead.',
|
||||
|
||||
'detail.deleteComment': 'Delete the comment?',
|
||||
'int.disconnectQuestion': 'Disconnect Gmail? The tokens are forgotten.',
|
||||
'int.newLinkQuestion': 'A new feed link? Every existing subscription stops working.',
|
||||
'data.deleteTemplate': 'Delete the template "{name}"?',
|
||||
'tokens.revokeQuestion': 'Revoke "{name}"? Everything using it stops working.',
|
||||
'account.signOutThisDevice': 'That is this device. You will be signed out.',
|
||||
|
||||
'project.deleteQuestion': 'Delete "{name}" with all its tasks?',
|
||||
'project.deleteRecoverable':
|
||||
'It goes to the trash and can be restored under Settings → Data and templates for {days} days.'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user