[Koha-bugs] [Bug 25504] Wrong API spec breaks plack without meaningul error
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu May 14 15:39:15 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25504
--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 104884
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104884&action=edit
Bug 25504: Crash with the original error if API spec are invalid
Bug 24700 put the whole spec validation into a try catch block that
hides the original error raised by the JSON validator.
If you don't have the patches from bug 25482 and start plack under D10
you will see a huge stacktrace with, lost in the middle:
Koha::REST::V1::catch {...} ("Duplicate keys not allowed, at character
offset 4789 (before "...) called at /usr/share/perl5/Try/Tiny.pm line 123
The complete output is at bug 25482 comment 11.
With this patch, you will get a single line:
Error while loading /etc/koha/sites/kohadev/plack.psgi: Can't load application
from file "/kohadevbox/koha/api/v1/app.pl": Duplicate keys not allowed, at
character offset 4789 (before "editcatalogue": "cre...") at
/usr/share/perl5/Mojo/JSON.pm line 39.
I am all for stacktraces, but not if the error is hidden ;)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list