https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26048

--- Comment #7 from David Cook <[email protected]> ---
At the moment, I don't have a perfect solution to cover both Plack Koha and CGI
Koha, but I think that we do need something.

Currently in CGI Koha, CGI::Carp overrides the SIGDIE handler.

Currently in Plack Koha, Starman calls Plack::Util::run_app (during
dispatch_request) and that function does an eval{} around the whole PSGI app to
trap the die(), so it doesn't even reach the SIGDIE handler.

--

I think the most obvious solution is to use the ErrorDocument defined in
Apache. 

For Plack Koha, we can do that by turning on ProxyErrorOverride and preventing
the proxying of /cgi-bin/koha/errors/500.pl.

For CGI Koha, we could remove usage of CGI::Carp. 

--

Alternatively, we could have Koha output its own 500 response without relying
on Apache. 

For Plack Koha, we'd need to write our own Plack::Middleware:: module.

For CGI Koha, we could add a handler to CGI::Carp. 

The downside of this is that we'd have to maintain 2 different code flows. 

That said, the upside is that we'd have more control over the error response.
We could start passing context-specific user-friendly messages in the 500
response. This could allow us to do error-handling which is a bit more
graceful.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to