mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Have simple-request return an error upon failing to find the system's root certificates
This commit is contained in:
@@ -158,7 +158,7 @@ impl Serai {
|
||||
}
|
||||
|
||||
pub async fn new(url: String) -> Result<Self, SeraiError> {
|
||||
let client = Client::with_connection_pool();
|
||||
let client = Client::with_connection_pool().map_err(|_| SeraiError::ConnectionError)?;
|
||||
let mut res = Serai { url, client, genesis: [0xfe; 32] };
|
||||
res.genesis = res.block_hash(0).await?.ok_or_else(|| {
|
||||
SeraiError::InvalidNode("node didn't have the first block's hash".to_string())
|
||||
|
||||
Reference in New Issue
Block a user