[Koha-bugs] [Bug 36421] Better logging of 500 errors in V1/Auth.pm
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Mar 29 10:09:33 CET 2024
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36421
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #163995|0 |1
is obsolete| |
--- Comment #5 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 164117
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164117&action=edit
Bug 36421: Make sure pre-controller errors are correctly logged
If something explodes in Koha::REST::V1::Auth chances are that no logging will
happen.
This patch makes sure they are!
To test:
1. Make sure you do NOT have 36420 on your tree
2. Make sure you are looking at the logs:
$ ktd --shell
k$ koha-plack --restart kohadev; tail -f /var/log/koha/kohadev/*.log
3. Use Postman or similar for hitting some known endpoint. Use
the user's cardnumber instead of the userid. On a default KTD launch, the
generated user's cardnumber is '42'.
GET /patrons
=> FAIL: You get a 500 error (expected, fixed on 36420) but no useful logging
found.
4. Apply this patch
5. Ctrl+c on the logs and re-run the command
6. Repeat 3
=> SUCCESS: You get a 500, but you also get the exception information logged!
7. Sign off :-D
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
[OK] prove t/db_dependent/api/v1/items.t
t/db_dependent/api/v1/unhandled_exceptions.t
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list