update error messages

This commit is contained in:
aler9
2021-09-27 16:40:49 +02:00
committed by Alessandro Ros
parent 6921a402d1
commit b748e6d0ff
6 changed files with 6 additions and 6 deletions
+1 -1
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)
}
}
+1 -1
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
+1 -1
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)
}
}
+1 -1
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
+1 -1
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)
}
}
+1 -1
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