ai cooking
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

don't error on cancel (#458)

authored by

Paul Miller and committed by
GitHub
6a43ff4e 730b62b8

+4
+4
internal/recipes/server.go
··· 265 265 w.Header().Set("Content-Type", http.DetectContentType(header)) 266 266 w.Header().Set("Cache-Control", "public, max-age=31536000, immutable") 267 267 if _, err := io.Copy(w, imageReader); err != nil { 268 + if ctx.Err() != nil { 269 + slog.DebugContext(ctx, "image stream canceled", "hash", hash, "ctxErr", ctx.Err(), "error", err) 270 + return 271 + } 268 272 slog.ErrorContext(ctx, "failed to stream cached recipe image", "hash", hash, "error", err) 269 273 } 270 274 }