Commit Graph
17 Commits
Author SHA1 Message Date
John O'Keefe 3bf5d8290e fix(auth): handle keyring open/set errors per service
Stop ignoring keyring.Open failures in all three login files. A failed
Open previously left a nil ring behind the blank identifier, so the next
Get/Set panicked with no message. Each service now opens its ring in
init, logs a service-prefixed warning when storage is unavailable, and
guards every use with a Ready check that fails safe to logged-out.

- AniListUserFunctions.go: add aniRingReady/aniRingSet helpers, log
  Open and per-key Set failures, reject invalid ExpiresIn instead of
  silently storing 0, clear in-memory JWT on logout even when storage
  is missing
- MALUserFunctions.go: add malRingReady/malRingSet helpers covering
  login, OAuth callback, and token-refresh saves; same Open/Set/
  ExpiresIn/logout treatment
- SimklUserFunctions.go: add simklRingReady/simklRingSet helpers;
  same Open/Set/logout treatment

No wallet, key names, or login flow changed. Same ServiceName
AniTrack, same keys, same OAuth callback behavior.
2026-09-12 21:22:58 -04:00
john-okeefe bc497521e7 feat(simkl): add comprehensive error handling
SimklFunctions.go:
- Update SimklHelper to return (json.RawMessage, error)
- Add status code validation (200-299 range)
- Update SimklGetUserWatchlist to return (SimklWatchListType, error)
- Update SimklSyncEpisodes to return (SimklAnime, error)
- Update SimklSyncRating to return (SimklAnime, error)
- Update SimklSyncStatus to return (SimklAnime, error)
- Update SimklSearch to return (SimklAnime, error)
- Update SimklSyncRemove to return (bool, error)
- Add proper error wrapping for all failure scenarios

SimklUserFunctions.go:
- Replace log.Fatalf with log.Printf in server error handling (line 119)
- Replace log.Fatal with log.Printf in JSON marshaling (line 141)

All Simkl API calls now properly propagate errors to frontend.
2026-03-30 20:08:20 -04:00
john-okeefe 72dfbf4a03 spelling correct 2025-01-17 20:39:18 -05:00
john-okeefe 5ee9c42352 cleaned up errors in go code 2024-12-15 00:19:48 -05:00
john-okeefe 064a2c7f7d added info for mac keychain 2024-10-18 22:06:33 -04:00
john-okeefe 45b11fa8f4 app now only allows a single instance 2024-09-07 22:35:51 -04:00
john-okeefe 4d9012b43c Fixed Simkl Bugs 2024-08-18 17:23:09 -04:00
john-okeefe 55cb0e2bd5 switched from .env to built-in envrionment file 2024-08-16 23:32:16 -04:00
john-okeefe 90b68b717a added logout functions 2024-08-15 16:16:40 -04:00
john-okeefe 0f647e85cb added dialog informing browser tab closing 2024-08-13 20:05:25 -04:00
john-okeefe 03413cd11a changed to mux so I can run sequentially. 2024-08-13 19:13:26 -04:00
john-okeefe fa3304db92 added MAL Login 2024-08-13 18:54:27 -04:00
john-okeefe 79ed79c25e removed unecessary println 2024-07-31 19:35:38 -04:00
john-okeefe d2ef265807 renamed and created anilist and simkl user functions
renamed anilist userid to user function. Created simkl user functions
2024-07-30 20:38:55 -04:00
john-okeefe 7044dc1d90 added check if logged in functions to anilist and simkl 2024-07-30 13:07:30 -04:00
john-okeefe 237958cce5 added simkl login to backend 2024-07-30 12:59:06 -04:00
john-okeefe 0ed827fc9a added simkl gettoken to bruno 2024-07-30 12:57:08 -04:00