feat: enhance error handling in OAuth URL building and client creation; improve tool argument sanitization
This commit is contained in:
@@ -29,11 +29,17 @@ impl LlmClient {
|
||||
} else {
|
||||
model
|
||||
};
|
||||
let client = reqwest::blocking::Client::builder()
|
||||
let client = match reqwest::blocking::Client::builder()
|
||||
.timeout(REQUEST_TIMEOUT)
|
||||
.connect_timeout(CONNECT_TIMEOUT)
|
||||
.build()
|
||||
.unwrap_or_else(|_| reqwest::blocking::Client::new());
|
||||
{
|
||||
Ok(c) => c,
|
||||
Err(e) => {
|
||||
eprintln!("warning: failed to build reqwest client with timeouts: {}. Using default client without timeouts.", e);
|
||||
reqwest::blocking::Client::new()
|
||||
}
|
||||
};
|
||||
LlmClient {
|
||||
client,
|
||||
api_key,
|
||||
|
||||
Reference in New Issue
Block a user