mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-06 06:27:40 +03:00
Handle suspended users
This commit is contained in:
parent
2b2bd8421b
commit
5cd5b553b0
1 changed files with 8 additions and 4 deletions
12
src/utils.rs
12
src/utils.rs
|
@ -532,10 +532,14 @@ pub async fn request(path: String) -> Result<Value, String> {
|
|||
Err(
|
||||
json["reason"]
|
||||
.as_str()
|
||||
.unwrap_or_else(|| {
|
||||
println!("{} - Error parsing reddit error", url);
|
||||
"Error parsing reddit error"
|
||||
})
|
||||
.unwrap_or(
|
||||
json["message"]
|
||||
.as_str()
|
||||
.unwrap_or_else(|| {
|
||||
println!("{} - Error parsing reddit error", url);
|
||||
"Error parsing reddit error"
|
||||
}),
|
||||
)
|
||||
.to_string(),
|
||||
)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue