Log HTTP Bodye on Upload Error into Task
All checks were successful
/ release (push) Successful in 46s

This commit is contained in:
speatzle 2025-03-19 11:06:18 +01:00
parent 2630ebb0cf
commit d25890ad26

View file

@ -99,7 +99,8 @@ func uploadFile(ctx context.Context, l *slog.Logger, conf config.Config, path st
l.InfoContext(ctx, "Upload Done") l.InfoContext(ctx, "Upload Done")
if resp.StatusCode != http.StatusOK { if resp.StatusCode != http.StatusOK {
return fmt.Errorf("Got HTTP Status Code: %v", resp.StatusCode) body, _ := io.ReadAll(resp.Body)
return fmt.Errorf("Got HTTP Status Code: %v Body: %v", resp.StatusCode, body)
} }
return nil return nil