Skip to content

Refactor response/success.go to improve response body logging #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

ShocOne
Copy link
Contributor

@ShocOne ShocOne commented Apr 11, 2024

Change

Type of Change

  • Refactor (refactoring code, removing code, changing code structure)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@ShocOne ShocOne merged commit 1f2561b into main Apr 11, 2024
// Read the response body into a buffer
bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
log.Error("Failed to read response body", zap.Error(err))

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant