Files
imgproxy/imagetype/errors.go
Victor Sokolov 2236bd8170 IMG-23: replace an old imagetype with the new one (#1482)
* imagetype (new) -> imagetype

* Always fallback in C-D, GetTypeMap -> GetTypeByName

* Do not send origin ContentType
2025-08-13 11:36:25 +02:00

24 lines
454 B
Go

package imagetype
import (
"net/http"
"github.com/imgproxy/imgproxy/v3/ierrors"
)
type (
UnknownFormatError struct{}
)
func newUnknownFormatError() error {
return ierrors.Wrap(
UnknownFormatError{},
1,
ierrors.WithStatusCode(http.StatusUnprocessableEntity),
ierrors.WithPublicMessage("Invalid source image"),
ierrors.WithShouldReport(false),
)
}
func (e UnknownFormatError) Error() string { return "Source image type not supported" }