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
Thread the API error code through to typed AppErrors (replaces string-sniffing) #94
The app throws the code away. ErrorDto in :core:network models only { "error": ... }, and safeApiCall maps HTTP status → AppError, with the AppError subclasses in :core:common
carrying just a message.
safeApiCall currently string-sniffs. It decides SubscriptionRequired with a message.contains("subscription") heuristic. That is a user-visible behaviour hanging off
English prose in a server response — it breaks the day the copy is reworded.
What to do
Add code to ErrorDto.
Widen AppError (or add a typed code alongside the message) so call sites can branch on the
server's own vocabulary.
Replace the contains("subscription") heuristic with the real code.
Fold :feature:ai's module-local AiError back onto the shared type once it can express quota_exceeded / rate_limited (+ Retry-After) / no_provider_configured.
Why it is filed rather than done
It touches every AppError construction site across all feature modules, so it needs a quiet
moment with no parallel branches in flight — otherwise it conflicts with everything. Best done
after the current parity wave merges.
Observed codes so far:bad_request (rejected viewingPreference), unauthorized
(GET /api/auth/accounts to a bearer token), plus quota_exceeded, rate_limited and no_provider_configured documented at https://interlinedlist.com/help/api/ai-integration.
Activity