Skip Menu |

This queue is for tickets about the SVN-Web CPAN distribution.

Report information
The Basics
Id: 12432
Status: resolved
Priority: 0/
Queue: SVN-Web

People
Owner: Nobody in particular
Requestors: glasser [...] mit.edu
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.38
Fixed in: (no value)



Subject: SVN::Web plugins should be able to fail in a more helpful way than dieing
All errors in a SVN::Web plugin &run subroutine are handled by "die", which turns into another "die" in &SVN::Web::run, which generally shows up as a 500 Internal Server Error. However, many of these reasons for death come from end-user error and could be worked around if a more appropriate error was given. See, for example, http://svn.clkao.org/svnweb/svk/browse/trunk/binfoobar/ -- this would more naturally and usefully give a 404 File Not Found. If the maintainers agree that this would be a useful change I would be interested in writing a patch for it after figuring out what the best method of change would be -- how much backwards compatibility with external plugins is necessary, etc.
From: nikc [...] cpan.org
Show quoted text
> All errors in a SVN::Web plugin &run subroutine are handled by "die", > which turns into another "die" in &SVN::Web::run, which generally > shows up as a 500 Internal Server Error. However, many of these > reasons for death come from end-user error and could be worked > around if a more appropriate error was given. > > See, for example, > http://svn.clkao.org/svnweb/svk/browse/trunk/binfoobar/ -- this > would more naturally and usefully give a 404 File Not Found. > > If the maintainers agree that this would be a useful change I would
be Show quoted text
> interested in writing a patch for it after figuring out what the > best method of change would be -- how much backwards compatibility > with external plugins is necessary, etc.
I'm inclined to think that there should be an 'error' template. Instead of dying, actions should return the error template and an appropriate error message. Thoughts? N
SVN::Web 0.42 (to be released soon) fixes this. Errors are now sent to a template, and each error message can be localised to provide as much user-friendly useful information as you think is necessary. Thanks for the bug report.