Handle suspended users
This commit is contained in:
parent
2b2bd8421b
commit
5cd5b553b0
@ -531,11 +531,15 @@ pub async fn request(path: String) -> Result<Value, String> {
|
||||
if json["error"].is_i64() {
|
||||
Err(
|
||||
json["reason"]
|
||||
.as_str()
|
||||
.unwrap_or(
|
||||
json["message"]
|
||||
.as_str()
|
||||
.unwrap_or_else(|| {
|
||||
println!("{} - Error parsing reddit error", url);
|
||||
"Error parsing reddit error"
|
||||
})
|
||||
}),
|
||||
)
|
||||
.to_string(),
|
||||
)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user