Actually show an error when we fail to get the user

Caught while reading code.
This commit is contained in:
Eli Ribble 2026-01-05 20:34:49 +00:00
parent 7779feac4b
commit c6b048d0cb

View file

@ -362,6 +362,10 @@ func htmlDashboard(ctx context.Context, w http.ResponseWriter, user *models.User
})
}
userContent, err := contentForUser(ctx, user)
if err != nil {
respondError(w, "Failed to get user context", err, http.StatusInternalServerError)
return
}
data := ContentDashboard{
CountInspections: int(inspectionCount),
CountMosquitoSources: int(sourceCount),