mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-06-17 22:37:33 +02:00
26 lines
557 B
Go
26 lines
557 B
Go
package processing
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"github.com/imgproxy/imgproxy/v3/ierrors"
|
|
"github.com/imgproxy/imgproxy/v3/imagetype"
|
|
)
|
|
|
|
type (
|
|
SaveFormatError string
|
|
)
|
|
|
|
func newSaveFormatError(format imagetype.Type) error {
|
|
return ierrors.Wrap(
|
|
SaveFormatError(fmt.Sprintf("Can't save %s, probably not supported by your libvips", format)),
|
|
1,
|
|
ierrors.WithStatusCode(http.StatusUnprocessableEntity),
|
|
ierrors.WithPublicMessage("Invalid URL"),
|
|
ierrors.WithShouldReport(false),
|
|
)
|
|
}
|
|
|
|
func (e SaveFormatError) Error() string { return string(e) }
|