diff --git a/src/kb_data_source.rs b/src/kb_data_source.rs index d8d3d5d..f60c0c3 100644 --- a/src/kb_data_source.rs +++ b/src/kb_data_source.rs @@ -135,10 +135,7 @@ impl KBDataSource { .set("Authorization", token.as_str()) .call() { - Ok(resp) => match resp.into_json() { - Ok(val) => val, - Err(_) => None, - }, + Ok(resp) => resp.into_json().unwrap_or_default(), Err(_) => None, }; }