Koha-clms/Koha/REST/Plugin
Tomas Cohen Arazi 0705360fc8 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@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[OK] prove t/db_dependent/api/v1/items.t t/db_dependent/api/v1/unhandled_exceptions.t
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e518e0be2c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-05-23 11:06:07 +02:00
..
Auth Bug 32178: (QA follow-up) Correct modules import 2022-11-18 12:04:32 -03:00
Exceptions.pm Bug 36421: Make sure pre-controller errors are correctly logged 2024-05-23 11:06:07 +02:00
Objects.pm Bug 29510: Make objects.find call search_limited if present 2024-02-19 14:41:11 +01:00
Pagination.pm Bug 33080: Allow pagination to be built from stashed values 2023-03-10 12:04:06 -03:00
PluginRoutes.pm Bug 22678: Replace a few unneeded Koha::Logger calls 2022-10-24 14:37:03 -03:00
Query.pm Bug 33971: Remove x-koha-query header support 2023-07-03 10:35:06 -03:00