https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23075
David Nind <da...@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90595|0 |1 is obsolete| | --- Comment #14 from David Nind <da...@davidnind.com> --- Created attachment 90596 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90596&action=edit Bug 23075: Better error handling in Mana config Currently, if you input an incorrect mana service URL in your config (http rather than https for example) the error message you are given is the direct output of a failed json parse. We should be able to catch such failures and display a more meaningful error to the end user. This patch makes it display a more friendly message. Test plan: 1. Add <mana_config>http://mana-test.koha-community.org</mana_config> to /etc/koha/sites/<instancename>/koha-conf.xml (see etc/koha-conf.xml in the Koha code repositoty for an example of where to add this; <instancename> if using koha-testing-docker is kohadev). 2. Clear memcached and restart services so that the changes in your Koha instance configuration are recognised (if using koha-testing-docker enter flush_memcached and then restart_all). 3. From the staff client home page go to Koha administration > Additional parameters > Share content with Mana KB. 4. Enable content sharing: change 'Use Mana KB for sharing content' to Yes and press Save. 5. Enter your first name, last name and email address in the Configure Mana KB section of the page and then press Send to Mana KB. 6. An error message is displayed, this may be something like 'malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.' 7. Apply the patch (git so bz apply 23075). 8. Repeat steps 2,3 and 5. 9. A more friendly/human readable error message is now displayed: 'Error trying to connect or read response from the Mana server (Code: 301) Moved Permanently'. Signed-off-by: David Nind <da...@davidnind.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/