mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-09-28 20:43:54 +02:00
* Removed imath.Min/Max * Skip goes to processing * no svg_processing error category * should report SVG
24 lines
431 B
Go
24 lines
431 B
Go
package svg
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
|
)
|
|
|
|
type (
|
|
SanitizeError struct{ error }
|
|
)
|
|
|
|
func newSanitizeError(err error) error {
|
|
return ierrors.Wrap(
|
|
SanitizeError{err},
|
|
1,
|
|
ierrors.WithStatusCode(http.StatusUnprocessableEntity),
|
|
ierrors.WithPublicMessage("Broken or unsupported SVG image"),
|
|
ierrors.WithShouldReport(true),
|
|
)
|
|
}
|
|
|
|
func (e SanitizeError) Unwrap() error { return e.error }
|