Log HTTP Bodye on Upload Error into Task
All checks were successful
/ release (push) Successful in 46s
All checks were successful
/ release (push) Successful in 46s
This commit is contained in:
parent
2630ebb0cf
commit
d25890ad26
1 changed files with 2 additions and 1 deletions
|
@ -99,7 +99,8 @@ func uploadFile(ctx context.Context, l *slog.Logger, conf config.Config, path st
|
|||
l.InfoContext(ctx, "Upload Done")
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue