update error messages

This commit is contained in:
aler9 2021-09-27 10:43:48 +02:00 committed by Alessandro Ros
parent 6921a402d1
commit b748e6d0ff
6 changed files with 6 additions and 6 deletions

View file

@ -43,7 +43,7 @@ func (d *AuthMethods) UnmarshalJSON(b []byte) error {
*d = append(*d, headers.AuthDigest)
default:
return fmt.Errorf("unsupported authentication method: %s", in)
return fmt.Errorf("invalid authentication method: %s", in)
}
}

View file

@ -51,7 +51,7 @@ func (d *Encryption) UnmarshalJSON(b []byte) error {
*d = EncryptionStrict
default:
return fmt.Errorf("unsupported encryption value: '%s'", in)
return fmt.Errorf("invalid encryption value: '%s'", in)
}
return nil

View file

@ -57,7 +57,7 @@ func (d *LogDestinations) UnmarshalJSON(b []byte) error {
(*d)[logger.DestinationSyslog] = struct{}{}
default:
return fmt.Errorf("unsupported log destination: %s", proto)
return fmt.Errorf("invalid log destination: %s", proto)
}
}

View file

@ -46,7 +46,7 @@ func (d *LogLevel) UnmarshalJSON(b []byte) error {
*d = LogLevel(logger.Debug)
default:
return fmt.Errorf("unsupported log level: %s", in)
return fmt.Errorf("invalid log level: %s", in)
}
return nil

View file

@ -63,7 +63,7 @@ func (d *Protocols) UnmarshalJSON(b []byte) error {
(*d)[ProtocolTCP] = struct{}{}
default:
return fmt.Errorf("unsupported protocol: %s", proto)
return fmt.Errorf("invalid protocol: %s", proto)
}
}

View file

@ -57,7 +57,7 @@ func (d *SourceProtocol) UnmarshalJSON(b []byte) error {
case "automatic":
default:
return fmt.Errorf("unsupported protocol '%s'", in)
return fmt.Errorf("invalid protocol '%s'", in)
}
return nil