[Bug 32490] New: When there's a broken spec, Mojolicious fails to capture the error properly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32490 Bug ID: 32490 Summary: When there's a broken spec, Mojolicious fails to capture the error properly Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com CC: tomascohen@gmail.com At some point we broke mojolious's built in error processing code. Instead of a useful stack track we now get a bunch of internal Mojo error code instead and nothing useful to point at the actual underlying problem.
The application raised the following error:
Can't use an undefined value as an ARRAY reference at template mojo/debug.html.ep line 288. Context: 283: </div> 284: <div class="tap tap-border-top">tap for more</div> 285: </div> 286: </div> 287: <div class="row"> 288: % if (@{app->log->history}) { 289: % my $log = join '', map { scalar app->log->format->(@$_) } @{app->log->history}; 290: <pre class="mojo-terminal"><code class="nohighlight"><%= $log %></code></pre> 291: % } 292: % else { 293: <div class="alert alert-warning wide" role="alert"> Traceback (most recent call first): File "template mojo/debug.html.ep", line 288, in "Mojo::Template::Sandbox::6bff7bf20514502e6c04c41933771297" . . . internal mojo stuff File "/usr/bin/starman", line 38, in "main" and the StackTrace middleware couldn't catch its stack trace, possibly because your application overrides $SIG{__DIE__} by itself, preventing the middleware from working correctly. Remove the offending code or module that does it: known examples are CGI::Carp and Carp::Always. For example I traced this back a little in the server logs where it points to Koha::Logger not implimenting the 'history' method. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32490 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The current code on bug 29453 highlights this -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32490 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22678 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22678 [Bug 22678] Set 'Koha::Logger' as the default mojo logger for the REST API -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32490 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Martin Renvoize from comment #1)
The current code on bug 29453 highlights this
Not any more it doesn't.. I used swagger-cli to validate and spot my issues. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32490 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jonathan.druart+koha@gmail. | |com Resolution|--- |DUPLICATE --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I haven't seen this one before. Wondering why it has been ignored for so long, it's a real pain for devs! *** This bug has been marked as a duplicate of bug 33020 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32490 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org