Skip to content
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

refactor: simplify error handling for multipart form reading #673

Merged

Conversation

alexandear
Copy link
Contributor

If err is nil, form can't be nil.

If err is nil and form is nil, there will be a panic on the line:

			Message:  "cannot read multipart form: " + err.Error(),

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.77%. Comparing base (1a01022) to head (7b2fa2c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #673   +/-   ##
=======================================
  Coverage   92.77%   92.77%           
=======================================
  Files          22       22           
  Lines        4915     4915           
=======================================
  Hits         4560     4560           
  Misses        308      308           
  Partials       47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielgtaylor danielgtaylor requested a review from Copilot December 9, 2024 17:45

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

Copy link
Owner

@danielgtaylor danielgtaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@danielgtaylor danielgtaylor merged commit b984c8a into danielgtaylor:main Dec 9, 2024
5 checks passed
@alexandear alexandear deleted the refactor/remove-multipart-form branch December 9, 2024 17:56
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.

2 participants