Koha-clms/Koha/REST/V1
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
..
Acquisitions Bug 36066: (follow-up) Move 403 to 409 when status ne cancelled 2024-03-11 15:35:52 +01:00
Auth Bug 34893: Add checkpw change to REST API 2024-01-29 10:15:53 +01:00
Biblios Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
CashRegisters Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Clubs Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Config/SMTP Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
ERM Bug 34587: (QA follow-up) Tidy 2023-10-31 16:46:32 -03:00
OAuth Bug 34271: Remove a few Logger statements from REST API 2023-10-18 10:26:03 -03:00
Patrons Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Preservation Bug 30708: Tidy perl files 2023-10-18 15:42:04 -03:00
AdvancedEditorMacro.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
ArticleRequests.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Auth.pm Bug 36421: Make sure pre-controller errors are correctly logged 2024-05-23 11:06:07 +02:00
AuthorisedValueCategories.pm Bug 32997: Add REST API endpoint to list authorised values for multiple given categories 2023-03-02 12:00:15 -03:00
AuthorisedValues.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Authorities.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
BackgroundJobs.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Biblios.pm Bug 33036: Improve REST API controller 2024-03-21 10:43:30 +01:00
Bookings.pm Bug 36100: (QA follow-up) Move 400 to 409 2024-03-11 11:00:23 +01:00
Checkouts.pm Bug 32496: Some fixes 2023-09-22 10:52:40 -03:00
CirculationRules.pm
…
Cities.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
ERM.pm Bug 33606: (QA follow-up) Cosmetic changes 2023-07-06 12:24:15 -03:00
Holds.pm Bug 35053: Make sure request is checked as an item-level request if item_id passed 2023-10-20 11:02:55 -03:00
Illbackends.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
IllbatchStatuses.pm Bug 30719: (QA follow-up) Rename illbatchstatuses 2023-10-17 14:45:22 -03:00
Illbatches.pm Bug 30719: (QA follow-up) Pick better column names and cleanup 2023-10-17 14:45:23 -03:00
Illrequests.pm Bug 30719: (QA follow-up) c->validation fixes 2023-10-17 14:45:18 -03:00
ImportBatchProfiles.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
ImportRecordMatches.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
ItemTypes.pm Bug 34008: (QA follow-up) 'item_type_id' should be used 2023-11-01 17:23:15 -03:00
Items.pm Bug 35963: Fix bundled items table ordering and filtering 2024-03-11 10:42:34 +01:00
Libraries.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
OAuth.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Patrons.pm Bug 29510: (follow-up) Adapt GET /patrons/:patron_id 2024-02-19 14:41:11 +01:00
Preservation.pm Bug 30708: Tidy perl files 2023-10-18 15:42:04 -03:00
Quotes.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
ReturnClaims.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
SearchFilter.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Stage.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
Static.pm
…
Suggestions.pm Bug 32942: (QA follow-up) Moving Suggestion->STATUS check to Suggestion::store 2023-09-18 15:31:45 -03:00
Tickets.pm Bug 33556: Avoid relying on $c->validation 2023-07-21 17:14:37 -03:00
TransferLimits.pm Bug 36329: Make POST /transfer_limits/batch honor BranchTransferLimitsType 2024-03-21 11:07:57 +01:00
TwoFactorAuth.pm Bug 30843: Add mfa_range configuration option for TOTP 2023-09-25 10:53:51 -03:00