Added log messages for a few errors

This commit is contained in:
Caleb J. Gardner
2025-09-05 03:27:13 -05:00
parent 3e1078efec
commit 243fa03af0
6 changed files with 11 additions and 2 deletions
+2
View File
@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"slices"
"strings"
@@ -120,6 +121,7 @@ func (b *BlogApp) Projects(ctx context.Context, techFilter string) (Portfolio, e
func (b *BlogApp) reqPortfolio(w http.ResponseWriter, r *http.Request) {
folio, err := b.Projects(r.Context(), r.URL.Query().Get("tech"))
if err != nil {
log.Println("error getting projects with filter", r.URL.Query().Get("tech")+":", err)
backend.ReturnError(w, http.StatusInternalServerError, "internal", "Server Error")
return
}