https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43516 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205545&action=edit Bug 43516: Add a shared, translated API error formatter Add fetch/api-error.js: a small formatApiError() helper that turns a thrown API error into a translated, user-facing message. Recognises 401 (session expired), 403 (not authorized), a network failure (fetch itself never reaching the server), and falls back to a generic message carrying the raw error text when available. Split out from bug 41129 (booking workflows) as generic frontend infrastructure. Test plan: 1. Run: yarn cypress run --component --browser electron --spec 't/cypress/component/fetch/api-error_spec.ts' 2. Verify all specs pass. Co-authored-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> Assisted-by: Opus 4.8 (Anthropic) Assisted-by: GPT 5.6 (OpenAI) Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.