Bladeren bron

should report SVG

Viktor Sokolov 1 maand geleden
bovenliggende
commit
eeb24ae767
2 gewijzigde bestanden met toevoegingen van 1 en 2 verwijderingen
  1. 0 1
      processing_handler_test.go
  2. 1 1
      svg/errors.go

+ 0 - 1
processing_handler_test.go

@@ -341,7 +341,6 @@ func (s *ProcessingHandlerTestSuite) TestErrorSavingToSVG() {
 	res := rw.Result()
 
 	s.Require().Equal(422, res.StatusCode)
-	fmt.Println(io.ReadAll(res.Body)) // Read the body to avoid resource leak
 }
 
 func (s *ProcessingHandlerTestSuite) TestCacheControlPassthroughCacheControl() {

+ 1 - 1
svg/errors.go

@@ -16,7 +16,7 @@ func newSanitizeError(err error) error {
 		1,
 		ierrors.WithStatusCode(http.StatusUnprocessableEntity),
 		ierrors.WithPublicMessage("Broken or unsupported SVG image"),
-		ierrors.WithShouldReport(false),
+		ierrors.WithShouldReport(true),
 	)
 }