You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/api/http/errors/invalidpayload.go

21 lines
375 B

package errors
import "errors"
type InvalidPayloadError struct {
msg string
}
func (e *InvalidPayloadError) Error() string {
return e.msg
}
func NewInvalidPayloadError(msg string) *InvalidPayloadError {
return &InvalidPayloadError{msg: msg}
}
func IsInvalidPayloadError(err error) bool {
var payloadError *InvalidPayloadError
return errors.As(err, &payloadError)
}