https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43310
--- Comment #11 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 208460 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208460&action=edit Bug 43310: (QA follow-up) Preserve errors and escape messages in http-client.js _fetchJSON() rethrew failures with `throw Error(error)`. As `error` is already an Error, this stringified it and prefixed the message, so a server message of "Invalid pin" reached callers as "Error: Invalid pin" and could never be matched. Changes: - Rethrow the original Error unchanged. - Dialog now builds the alert with textContent instead of formatting the message into HTML, so server-supplied error text is not injected as markup. - Add an optional `suppress_dialog` parameter to the verbs so callers that render their own error do not also get the generic #messages warning. - Add Cypress coverage for the unprefixed error message and for resolving to null on 204 No Content. Test plan: 1. Run: yarn cypress run --spec t/cypress/integration/HttpClient_spec.ts => SUCCESS: all tests pass Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
