1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-12-23 22:11:10 +02:00
Files
imgproxy/xmlparser/errors.go

22 lines
383 B
Go
Raw Permalink Normal View History

2025-10-24 23:34:05 +03:00
package xmlparser
2025-10-21 20:52:16 +03:00
import (
"fmt"
"net/http"
"github.com/imgproxy/imgproxy/v3/errctx"
2025-10-21 20:52:16 +03:00
)
type (
SyntaxError struct{ *errctx.TextError }
2025-10-21 20:52:16 +03:00
)
func newSyntaxError(msg string, args ...any) error {
return SyntaxError{errctx.NewTextError(
fmt.Sprintf(msg, args...),
2025-10-21 20:52:16 +03:00
1,
errctx.WithPublicMessage("SVG syntax error"),
errctx.WithStatusCode(http.StatusUnprocessableEntity),
)}
2025-10-21 20:52:16 +03:00
}