Actually show an error when we fail to get the user
Caught while reading code.
This commit is contained in:
parent
7779feac4b
commit
c6b048d0cb
1 changed files with 4 additions and 0 deletions
4
html.go
4
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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue