We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PkiEnvironment.fetch_crls()
1 parent 259c8e9 commit 0268640Copy full SHA for 0268640
e2e-identity/src/pki_env/crl.rs
@@ -1,6 +1,6 @@
1
use std::collections::{HashMap, HashSet};
2
3
-use super::Result;
+use super::{Error, Result};
4
use crate::pki_env::{
5
PkiEnvironment,
6
hooks::{HttpMethod, PkiEnvironmentHooksError},
@@ -18,10 +18,10 @@ impl PkiEnvironment {
18
.http_request(HttpMethod::Get, uri.clone(), vec![], vec![])
19
.await?;
20
if !(200..300).contains(&response.status) {
21
- return Err(PkiEnvironmentHooksError {
22
- reason: format!("Failed to fetch CRL from '{uri}': HTTP {}", response.status),
23
- }
24
- .into());
+ return Err(Error::CrlFetchUnsuccessful {
+ uri,
+ status: response.status,
+ });
25
}
26
27
crls.insert(uri, response.body);
0 commit comments