## 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. |
||
|---|---|---|
| .. | ||
| .pest | ||
| Browser | ||
| Feature | ||
| Performance | ||
| Unit | ||
| Pest.php | ||
| TestCase.php | ||
| bootstrap.php | ||