vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Render the styled error page for every miss and failure
e84a66f5b53c269d8b0c207d0335b537e1646cb3 · Keenan Nemetz · 15d ago · parent f6f4b1db
Render the styled error page for every miss and failure Handler-level 404s now use the same view as the catch-all, including unknown detail resources and download paths. Internal 500s render the shared error layout and log the detail instead of exposing it. A panic before the first byte is recovered into that page; a partial response is left to net/http. Also mark label/assignee triage and inline review comments done in the UI plan, where the slice order was stale.
server/web/issues.go +5−5
| @@ -71,7 +71,7 @@ func (w *Web) Issues(rw http.ResponseWriter, r *http.Request) { | |||
| 71 | 71 | return | |
| 72 | 72 | } | |
| 73 | 73 | if err := w.Index.EnsureIssues(m); err != nil { | |
| 74 | http.Error(rw, "issue index unavailable: "+err.Error(), http.StatusInternalServerError) | ||
| 74 | w.serverError(rw, r, "issue index unavailable: "+err.Error()) | ||
| 75 | 75 | return | |
| 76 | 76 | } | |
| 77 | 77 | state := strings.TrimSpace(r.URL.Query().Get("state")) | |
| @@ -91,7 +91,7 @@ func (w *Web) Issues(rw http.ResponseWriter, r *http.Request) { | |||
| 91 | 91 | // badge that changes when you search would be a lie. | |
| 92 | 92 | all, err := w.Index.Issues(m.ID, index.Filter{}) | |
| 93 | 93 | if err != nil { | |
| 94 | http.Error(rw, err.Error(), http.StatusInternalServerError) | ||
| 94 | w.serverError(rw, r, "cannot read issues: "+err.Error()) | ||
| 95 | 95 | return | |
| 96 | 96 | } | |
| 97 | 97 | open := 0 | |
| @@ -102,7 +102,7 @@ func (w *Web) Issues(rw http.ResponseWriter, r *http.Request) { | |||
| 102 | 102 | } | |
| 103 | 103 | rows, err := w.Index.Issues(m.ID, filter) | |
| 104 | 104 | if err != nil { | |
| 105 | http.Error(rw, err.Error(), http.StatusInternalServerError) | ||
| 105 | w.serverError(rw, r, "cannot read issues: "+err.Error()) | ||
| 106 | 106 | return | |
| 107 | 107 | } | |
| 108 | 108 | // Open first, then newest first within each state. | |
| @@ -345,12 +345,12 @@ func (w *Web) IssueView(rw http.ResponseWriter, r *http.Request) { | |||
| 345 | 345 | } | |
| 346 | 346 | id := r.PathValue("id") | |
| 347 | 347 | if !voleid.Valid(id) { | |
| 348 | http.NotFound(rw, r) | ||
| 348 | w.notFound(rw, r) | ||
| 349 | 349 | return | |
| 350 | 350 | } | |
| 351 | 351 | iss, err := index.LoadIssue(m, id) | |
| 352 | 352 | if err != nil { | |
| 353 | http.NotFound(rw, r) | ||
| 353 | w.notFound(rw, r) | ||
| 354 | 354 | return | |
| 355 | 355 | } | |
| 356 | 356 | comments := w.issueComments(m, iss) | |