feat(client): Reject empty open_timeouts configuration with dedicated error
This commit is contained in:
1 parent
04ebaf829a
commit
befe431304
3 files changed
+17
No files matched your search
@@ -11,6 +11,9 @@ use crate::{
|
||||
};
|
||||
|
||||
pub(crate) fn validate_open_timeouts(timeouts: &[Duration]) -> Result<(), ClientError> {
|
||||
if timeouts.is_empty() {
|
||||
return Err(ClientError::NoOpenTimeouts);
|
||||
}
|
||||
for timeout in timeouts {
|
||||
if *timeout < MIN_OPEN_TIMEOUT {
|
||||
return Err(ClientError::OpenTimeoutTooSmall {
|
||||
|
||||
Reference in new issue
Block a user