From e17b7749d22957a3fc11e1b83ab7e7387d564592 Mon Sep 17 00:00:00 2001 From: Diretnan Domnan Date: Thu, 15 Apr 2021 16:45:28 +0100 Subject: [PATCH] prevent caching null response --- src/utils.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 3acc572..449143d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -276,7 +276,9 @@ pub mod cached_reqwest { let (mut file, contents) = create_or_retrieve(concat_url, exe_path); // if file is empty then cache does not exist // then retrieve directly using reqwest - if (contents.as_str()).eq("") || (contents.as_str()).eq("error code: 1020") { + if (contents.as_str()).eq("") || + (contents.as_str()).eq("error code: 1020") || + (contents.as_str()).eq("({\"response\":null});"){ let res = reqwest::Client::new() .post(url) .form(¶ms)