add some more logging in phoneajax
This commit is contained in:
parent
b2414e0c33
commit
bb762b2f47
2 changed files with 5 additions and 4 deletions
|
@ -315,18 +315,19 @@ impl SteamApiClient {
|
|||
.send()?;
|
||||
|
||||
let result: Value = resp.json()?;
|
||||
trace!("phoneajax: {:?}", result);
|
||||
if result["has_phone"] != Value::Null {
|
||||
trace!("found has_phone field");
|
||||
trace!("op: {} - found has_phone field", op);
|
||||
return result["has_phone"]
|
||||
.as_bool()
|
||||
.ok_or(anyhow!("failed to parse has_phone field into boolean"));
|
||||
} else if result["success"] != Value::Null {
|
||||
trace!("found success field");
|
||||
trace!("op: {} - found success field", op);
|
||||
return result["success"]
|
||||
.as_bool()
|
||||
.ok_or(anyhow!("failed to parse success field into boolean"));
|
||||
} else {
|
||||
trace!("did not find any expected field");
|
||||
trace!("op: {} - did not find any expected field", op);
|
||||
return Ok(false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue