Bugzilla – Attachment 145929 Details for
Bug 32777
Unhandled exception not displaying stack trace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32777: Display stack trace for REST API unhandled exception
Bug-32777-Display-stack-trace-for-REST-API-unhandl.patch (text/plain), 1.05 KB, created by
Jonathan Druart
on 2023-02-01 11:20:46 UTC
(
hide
)
Description:
Bug 32777: Display stack trace for REST API unhandled exception
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-02-01 11:20:46 UTC
Size:
1.05 KB
patch
obsolete
>From f0fefff9956dbc9f84f5702af35f197c876d369a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Feb 2023 12:19:13 +0100 >Subject: [PATCH] Bug 32777: Display stack trace for REST API unhandled > exception > >--- > Koha/REST/Plugin/Exceptions.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/Koha/REST/Plugin/Exceptions.pm b/Koha/REST/Plugin/Exceptions.pm >index fd28d67e7f6..4d6adcf144c 100644 >--- a/Koha/REST/Plugin/Exceptions.pm >+++ b/Koha/REST/Plugin/Exceptions.pm >@@ -21,6 +21,8 @@ use Scalar::Util qw( blessed ); > > use Mojo::Base 'Mojolicious::Plugin'; > >+use Devel::StackTrace; >+ > =head1 NAME > > Koha::REST::Plugin::Exceptions >@@ -68,7 +70,9 @@ sub register { > > my $message = "$method $path: unhandled exception $type\<\<$exception_string\>\>"; > >- $c->app->log->error( "$message" ); >+ my $trace = Devel::StackTrace->new->as_string; >+ >+ $c->app->log->error( "$message\n$trace"); > > $c->render( > status => 500, >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32777
: 145929