whisper-money/app
Víctor Falcón bef657c2ed
fix(currency): degrade gracefully when rates return 404 (#449)
## Problem

`PHP-LARAVEL-2M` (High, escalating, 38 events) — `RuntimeException:
Failed to fetch currency rates for xxx on 2025-12-31: HTTP 404` crashing
`/dashboard`.

A user holds an account in currency `xxx` (ISO 4217 "no/unknown
currency"). No rate file exists for it, so every candidate URL returns
404. `CurrencyConversionService::fetchRates` threw an unhandled
`RuntimeException` that bubbled past the graceful-degradation logic in
`ExchangeRateService::convert` and broke the whole dashboard render.

## Fix

Distinguish **permanent** 404s from **transient** failures:
- All sources return 404 → log a warning and return `[]`. Callers
already handle empty rates (return unconverted / zero amount).
- Timeouts / 5xx / connection errors → still throw, so real outages stay
visible.

## Tests

- New: unknown base currency with all-404 sources returns `0.0` instead
of throwing.
- Existing "throws when both primary and fallback fail" (500s) still
passes — transient errors still surface.

Fixes PHP-LARAVEL-2M.
2026-05-29 14:44:56 +02:00
..
Actions fix(categories): expose cashflow setting on create (#448) 2026-05-29 11:05:04 +02:00
Console/Commands feat(leads): add user lead re-invite campaign (#432) 2026-05-26 08:35:31 +02:00
Contracts feat(banking): add banking:backfill-ibans command to populate missing IBANs (#221) 2026-03-12 10:58:55 +00:00
Enums feat(cashflow): add savings and period views (#424) 2026-05-25 16:41:00 +02:00
Events Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Exceptions/Banking Handle transient EnableBanking sync failures (#358) 2026-05-06 09:24:05 +02:00
Features feat(import): calculate balances from transactions (#403) 2026-05-20 10:29:14 +01:00
Http fix(categories): expose cashflow setting on create (#448) 2026-05-29 11:05:04 +02:00
Jobs fix: batch automation rule application (#435) 2026-05-26 10:45:37 +02:00
Listeners feat(emails): co-founder language, welcome rewrite, and Spanish translations (#208) 2026-03-05 15:22:07 +01:00
Mail feat(leads): add user lead re-invite campaign (#432) 2026-05-26 08:35:31 +02:00
Models feat(transactions): add counterparty fields (#440) 2026-05-27 16:20:55 +02:00
Notifications feat: selective retry of failed lead email jobs (#286) 2026-04-15 08:00:29 +01:00
Policies feat(accounts): add real estate asset tracking (#241) 2026-03-24 10:21:32 +00:00
Providers feat: keep past due subscriptions active (#416) 2026-05-22 10:19:11 +01:00
Services fix(currency): degrade gracefully when rates return 404 (#449) 2026-05-29 14:44:56 +02:00