fix(apb): dont panic if missing pubkey, return ""
This commit is contained in:
parent
44de7040ec
commit
b708f642c1
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ impl PublicKey for serde_json::Value {
|
|||
crate::getter! { owner -> &str }
|
||||
|
||||
fn public_key_pem(&self) -> &str {
|
||||
self.get("publicKeyPem").unwrap().as_str().unwrap()
|
||||
self.get("publicKeyPem").map(|x| x.as_str().unwrap_or_default()).unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue