Bug 32777 - Unhandled exception not displaying stack trace
Summary: Unhandled exception not displaying stack trace
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on: 25032
Blocks:
  Show dependency treegraph
 
Reported: 2023-02-01 11:18 UTC by Jonathan Druart
Modified: 2023-02-20 08:10 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 32777: Display stack trace for REST API unhandled exception (1.05 KB, patch)
2023-02-01 11:20 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-02-01 11:18:30 UTC
It's painful to debug, we should display the stack trace to track down the root of the problem.
Comment 1 Jonathan Druart 2023-02-01 11:20:46 UTC
Created attachment 145929 [details] [review]
Bug 32777: Display stack trace for REST API unhandled exception
Comment 2 Jonathan Druart 2023-02-01 11:21:49 UTC
Do we need that in production as well? Do we actually have stack traces in production for other 500? If not, why? How do people debug crashes if they are not displayed?
Comment 3 Marcel de Rooy 2023-02-01 12:35:57 UTC
I am all for those stack traces. Note that the stack trace in plack-error.log often contains only a few useful lines. All the internal Plack stuff is just waste of space..
Devel::Stacktrace allows you to filter?
Comment 4 Marcel de Rooy 2023-02-17 10:58:31 UTC
Can we proceed here?
Comment 5 Jonathan Druart 2023-02-17 11:12:32 UTC
(In reply to Marcel de Rooy from comment #4)
> Can we proceed here?

Not sure how. We are going to display a stack trace in production, and I think we don't for other exceptions (whereas we should IMO).
So maybe we should add a 'if $dev_install' condition to display the stack trace?
Comment 6 Marcel de Rooy 2023-02-20 08:10:25 UTC
(In reply to Jonathan Druart from comment #5)
> So maybe we should add a 'if $dev_install' condition to display the stack
> trace?

Configurable number of frames from the top? Zero means no trace?
Not sure if this is a parameter from Devel module though.