update error messages
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user