log 404s and other log improvements.

This commit is contained in:
fiatjaf
2024-10-06 15:56:20 -03:00
parent a5dac15262
commit 84b81654f0
9 changed files with 14 additions and 10 deletions

View File

@@ -53,7 +53,8 @@ func renderImage(w http.ResponseWriter, r *http.Request) {
data, err := grabData(ctx, code)
if err != nil {
http.Error(w, "error fetching event: "+err.Error(), 404)
http.Error(w, "error fetching event: "+err.Error(), http.StatusNotFound)
log.Warn().Err(err).Str("code", code).Msg("event not found on render_image")
return
}