fix: replace fmt.Printf with observability warn in error page path
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
@@ -98,7 +97,7 @@ func (h *PlaybackHandler) HandleWatchPage(c *gin.Context) {
|
|||||||
if data.Anime.MalID == 0 && data.WatchData.MalID == 0 && len(data.Episodes) == 0 {
|
if data.Anime.MalID == 0 && data.WatchData.MalID == 0 && len(data.Episodes) == 0 {
|
||||||
anime, fetchErr := h.animeSvc.GetAnimeByID(c.Request.Context(), id)
|
anime, fetchErr := h.animeSvc.GetAnimeByID(c.Request.Context(), id)
|
||||||
if fetchErr != nil {
|
if fetchErr != nil {
|
||||||
fmt.Printf("error fetching anime for error page: %v\n", fetchErr)
|
observability.Warn("error_page_anime_fetch_failed", "playback", "", map[string]any{"anime_id": id}, fetchErr)
|
||||||
}
|
}
|
||||||
data = domain.WatchPageData{
|
data = domain.WatchPageData{
|
||||||
Anime: anime,
|
Anime: anime,
|
||||||
|
|||||||
Reference in New Issue
Block a user