diff --git a/html.go b/html.go index c91addf6..2456d3fa 100644 --- a/html.go +++ b/html.go @@ -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),