Skip to content

Commit

Permalink
move responseStatus back
Browse files Browse the repository at this point in the history
  • Loading branch information
df-wg committed Dec 15, 2024
1 parent 0482469 commit 4b857df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v2/pkg/engine/datasource/httpclient/nethttpclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ func makeHTTPRequest(client *http.Client, ctx context.Context, url, method, head

response, err := client.Do(request)

// Set response, even before error check, to ensure that it's in the context
setResponseStatus(ctx, request, response)

if err != nil {
return err
}
defer response.Body.Close()

setResponseStatus(ctx, request, response)

respReader, err := respBodyReader(response)

if err != nil {
return err
}
Expand Down

0 comments on commit 4b857df

Please sign in to comment.