feat(client): Reject empty open_timeouts configuration with dedicated error

This commit is contained in:
Nils Andreas Svee committed 2026-04-28 17:58:31 +07:00
1 parent 3a523092fb
commit e0a48e1d53
3 files changed
+17

No files matched your search

+3
View File
@@ -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 {