https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39408

Martin Renvoize (ashimema) <martin.renvo...@openfifth.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #180255|0                           |1
        is obsolete|                            |

--- Comment #5 from Martin Renvoize (ashimema) 
<martin.renvo...@openfifth.co.uk> ---
Created attachment 182165
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182165&action=edit
Bug 39408: Handle BadParameter exception better

Currently we assume BadParameter has been thrown with a parameter that is a
valid patron field.
It may only include a message, or it may have come from outside the patron
object, we should
handle all cases.

To test:
1 - Wrap "WELCOME" notice content in conditional:
    [% IF borrower.categorycode != 'SELFREG' %]
    ...
    [% END %]
2 - Enable preference AutoEmailNewUser
3 - Attempt to self register a patron via API with body:
   
{"surname":"PATRON","firstname":"PROBLEM","library_id":"CPL","category_id":"SELFREG","email":"eam...@example.org"}
4 - Response error: "Given  does not exist"
5 - Apply this patch, restart all
6 - Repeat 3
7 - Response error: "Exception 'Koha::Exceptions::BadParameter' thrown
'Parameter message_id cannot be empty if passed.'\n"
8 - It's uglier, but actually helpful

Signed-off-by: Claire Hernandez <claire.hernan...@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvo...@openfifth.co.uk>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://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/

Reply via email to