Summary
Several locations silently discard errors from credential persistence and configuration loading, making it difficult to diagnose authentication and config failures.
Affected Locations
1. Token persistence errors silently dropped
File: internal/auth/oauth.go:146-148
newJSON, _ := json.Marshal(newToken) // marshal error dropped
_ = p.store.Set(secrets.KeyOAuthToken, string(newJSON)) // persist error dropped
If token persistence fails, the user will be forced to re-authenticate on every run with no diagnostic information.
2. Credential store write error dropped
File: cmd/gcal-organizer/auth_config.go:104
_ = store.Set(secrets.KeyClientCredentials, string(credsData))
If keychain write fails during auth login, user gets no indication credentials were not saved.
3. UserHomeDir errors dropped
File: cmd/gcal-organizer/main.go:99,129
home, _ := os.UserHomeDir()
If UserHomeDir fails, home is empty and migration runs against a relative path.
Fix
Add warning-level logging at each site:
if err := store.Set(...); err != nil {
logging.Logger.Warn("failed to persist token to store", "error", err)
}
Priority
MEDIUM — Silent failures make credential issues very difficult to diagnose.
Summary
Several locations silently discard errors from credential persistence and configuration loading, making it difficult to diagnose authentication and config failures.
Affected Locations
1. Token persistence errors silently dropped
File:
internal/auth/oauth.go:146-148If token persistence fails, the user will be forced to re-authenticate on every run with no diagnostic information.
2. Credential store write error dropped
File:
cmd/gcal-organizer/auth_config.go:104If keychain write fails during
auth login, user gets no indication credentials were not saved.3. UserHomeDir errors dropped
File:
cmd/gcal-organizer/main.go:99,129If
UserHomeDirfails,homeis empty and migration runs against a relative path.Fix
Add warning-level logging at each site:
Priority
MEDIUM — Silent failures make credential issues very difficult to diagnose.