refactor: wrap bare errors with context in playback package

This commit is contained in:
2026-06-16 10:42:37 +02:00
committed by Milas Holsting
parent 290dc36298
commit ca08af2dbb
4 changed files with 30 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package handler
import (
"context"
"fmt"
netutil "mal/pkg/net"
"net/http"
)
@@ -9,7 +10,7 @@ import (
func newProxyRequest(ctx context.Context, targetURL string, referer string) (*http.Request, error) {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, targetURL, nil)
if err != nil {
return nil, err
return nil, fmt.Errorf("build proxy request for %q: %w", targetURL, err)
}
if referer != "" {