Handle suspended users

This commit is contained in:
spikecodes 2021-02-24 11:26:23 -08:00
parent 2b2bd8421b
commit 5cd5b553b0
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB

View File

@ -532,10 +532,14 @@ pub async fn request(path: String) -> Result<Value, String> {
Err( Err(
json["reason"] json["reason"]
.as_str() .as_str()
.unwrap_or_else(|| { .unwrap_or(
println!("{} - Error parsing reddit error", url); json["message"]
"Error parsing reddit error" .as_str()
}) .unwrap_or_else(|| {
println!("{} - Error parsing reddit error", url);
"Error parsing reddit error"
}),
)
.to_string(), .to_string(),
) )
} else { } else {