1
Fork 1
mirror of https://git.lolcat.ca/lolcat/4get.git synced 2024-09-13 17:28:08 -04:00

additional qwant error handling

This commit is contained in:
lolcat 2024-04-27 15:03:56 -04:00
parent bad8d7ad50
commit f8d46df1e8

View file

@ -659,6 +659,11 @@ class qwant{
throw new Exception("Qwant returned an API error");
}
if(isset($json["data"]["result"]["items"]["mainline"])){
throw new Exception("Qwant returned gibberish results");
}
$out = [
"status" => "ok",
"npt" => null,
@ -754,6 +759,11 @@ class qwant{
throw new Exception("Qwant returned an API error");
}
if(isset($json["data"]["result"]["items"]["mainline"])){
throw new Exception("Qwant returned gibberish results");
}
$out = [
"status" => "ok",
"npt" => null,
@ -856,6 +866,11 @@ class qwant{
throw new Exception("Qwant returned an API error");
}
if(isset($json["data"]["result"]["items"]["mainline"])){
throw new Exception("Qwant returned gibberish results");
}
$out = [
"status" => "ok",
"npt" => null,