[Koha-bugs] [Bug 43516] Harden the frontend HttpClient and add a shared API error formatter