Fix connection reset error

This commit is contained in:
spikecodes 2021-01-26 11:00:07 -08:00
parent f038aa61f4
commit d5b1c3a5bb
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ pub async fn request(path: String) -> Result<Value, String> {
// If response is success
Ok(response) => {
// Parse the response from Reddit as JSON
match from_str(&response.into_string().unwrap()) {
match from_str(&response.into_string().unwrap_or_default()) {
Ok(json) => Ok(json),
Err(_) => {
dbg!(format!("{} - Failed to parse page JSON data", url));