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

fix: better error message when the max upload size is exceeded #158

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

HarikrishnanBalagopal
Copy link
Contributor

No description provided.

Copy link

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

@github-actions github-actions bot added the fix label Feb 23, 2024
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.48%. Comparing base (8779288) to head (f798a51).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #158   +/-   ##
=======================================
  Coverage   14.48%   14.48%           
=======================================
  Files           2        2           
  Lines         214      214           
=======================================
  Hits           31       31           
  Misses        179      179           
  Partials        4        4           

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

@@ -53,6 +53,15 @@ func HandleCreateProjectInput(w http.ResponseWriter, r *http.Request, isCommon b
}
r.Body = http.MaxBytesReader(w, r.Body, common.Config.MaxUploadSize)
if err := r.ParseMultipartForm(common.Config.MaxUploadSize); err != nil {
if _, ok := err.(*http.MaxBytesError); ok {
logrus.Errorf("request body exceeded max upload size of '%d' bytes. Error: %q", common.Config.MaxUploadSize, err)
Copy link
Member

Choose a reason for hiding this comment

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

Would it be good to mention which config to change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

seshapad
seshapad previously approved these changes Feb 23, 2024
@ashokponkumar ashokponkumar merged commit 09e78d0 into konveyor:main Feb 23, 2024
3 checks passed
@HarikrishnanBalagopal HarikrishnanBalagopal deleted the feat/bettererrors branch February 23, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants