Skip to content

Commit

Permalink
Merge pull request #532 from fuzzland/builder-bug
Browse files Browse the repository at this point in the history
Fix bug.
  • Loading branch information
Cloud10240 authored Aug 12, 2024
2 parents d269f60 + 6356ee5 commit d63fe0c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/evm/blaz/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,16 @@ impl BuildJobResult {
let resp = client.get(&url).send().expect("retrieve onchain job failed");

let json = serde_json::from_str::<Value>(&resp.text().expect("parse json failed")).expect("parse json failed");
if !json["success"].as_bool().expect("get status failed") {
error!("retrieve onchain job failed for {:?}", url);
if let Some(success) = json["success"].as_bool() {
if !success {
error!("retrieve onchain job failed for {:?}", url);
return None;
}
} else {
error!("retrieve onchain job status failed for {:?}", url);
return None;
}

Self::from_json(&json)
}

Expand Down

0 comments on commit d63fe0c

Please sign in to comment.