Use error page template for errors

This commit is contained in:
Teajey 2025-12-07 22:13:43 +09:00
parent a2cd38617a
commit 0376cecb82
Signed by: Teajey
GPG Key ID: 970E790FE834A713
2 changed files with 4 additions and 3 deletions

View File

@ -13,8 +13,9 @@ func NotFound() rsvp.Response {
func Error(status int, format string, a ...any) rsvp.Response {
return rsvp.Response{
Body: fmt.Sprintf(format, a...),
Status: status,
Body: fmt.Sprintf(format, a...),
Status: status,
TemplateName: "error_page.gotmpl",
}
}

View File

@ -26,7 +26,7 @@
</div>
<div class="container d-flex flex-grow-1 justify-content-center align-items-center flex-column">
<div class="alert alert-danger" role="alert">
<p class="mb-0">{{.Message}}</p>
<p class="mb-0">{{.}}</p>
</div>
</div>
</div>