1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2026-04-23 19:41:06 +02:00
Files
imgproxy/processing/errors.go
T

24 lines
519 B
Go
Raw Normal View History

package processing
import (
"fmt"
"net/http"
2025-11-20 01:26:21 +06:00
"github.com/imgproxy/imgproxy/v3/errctx"
"github.com/imgproxy/imgproxy/v3/imagetype"
)
type (
2025-11-20 01:26:21 +06:00
SaveFormatError struct{ *errctx.TextError }
)
func newSaveFormatError(format imagetype.Type) error {
2025-11-20 01:26:21 +06:00
return SaveFormatError{errctx.NewTextError(
fmt.Sprintf("Can't save %s, probably not supported by your libvips", format),
1,
2025-11-20 01:26:21 +06:00
errctx.WithStatusCode(http.StatusUnprocessableEntity),
errctx.WithPublicMessage("Invalid URL"),
errctx.WithShouldReport(false),
)}
}