From 4c371ef706ba5d5d0487ff8a9e4b75d168a6e267 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 24 Jan 2023 09:49:37 +0000 Subject: viewvcs: show message for 404||500 errors Since the debug log isn't present from the /$REPO/ URLs, the lack of debug log makes 404s look confusing. --- lib/PublicInbox/ViewVCS.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 0dfe6081..99f5e24f 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -497,8 +497,9 @@ sub show_tag ($$) { sub solve_result { my ($res, $ctx) = @_; my $hints = delete $ctx->{hints}; - $res or return html_page($ctx, 404, dbg_log($ctx)); - ref($res) eq 'ARRAY' or return html_page($ctx, 500, dbg_log($ctx)); + $res or return html_page($ctx, 404, 'Not found', dbg_log($ctx)); + ref($res) eq 'ARRAY' or + return html_page($ctx, 500, 'Internal error', dbg_log($ctx)); my ($git, $oid, $type, $size, $di) = @$res; return show_commit($ctx, $res) if $type eq 'commit'; -- cgit v1.2.3-24-ge0c7