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()?;
|
.send()?;
|
||||||
|
|
||||||
let result: Value = resp.json()?;
|
let result: Value = resp.json()?;
|
||||||
|
trace!("phoneajax: {:?}", result);
|
||||||
if result["has_phone"] != Value::Null {
|
if result["has_phone"] != Value::Null {
|
||||||
trace!("found has_phone field");
|
trace!("op: {} - found has_phone field", op);
|
||||||
return result["has_phone"]
|
return result["has_phone"]
|
||||||
.as_bool()
|
.as_bool()
|
||||||
.ok_or(anyhow!("failed to parse has_phone field into boolean"));
|
.ok_or(anyhow!("failed to parse has_phone field into boolean"));
|
||||||
} else if result["success"] != Value::Null {
|
} else if result["success"] != Value::Null {
|
||||||
trace!("found success field");
|
trace!("op: {} - found success field", op);
|
||||||
return result["success"]
|
return result["success"]
|
||||||
.as_bool()
|
.as_bool()
|
||||||
.ok_or(anyhow!("failed to parse success field into boolean"));
|
.ok_or(anyhow!("failed to parse success field into boolean"));
|
||||||
} else {
|
} else {
|
||||||
trace!("did not find any expected field");
|
trace!("op: {} - did not find any expected field", op);
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue