Add error handling
This commit is contained in:
parent
046195503c
commit
fdc7c887e5
|
|
@ -167,6 +167,10 @@ pub async fn market_cap_index() -> Result<(), Box<dyn std::error::Error + Send +
|
||||||
return Err("Err")?;
|
return Err("Err")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if v.as_object().unwrap().get("data").is_none() {
|
||||||
|
return Err("Err")?;
|
||||||
|
}
|
||||||
|
|
||||||
into_vec = v
|
into_vec = v
|
||||||
.as_object()
|
.as_object()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user