generated from mirzaev/pot
fixed 402 reponse error
This commit is contained in:
parent
1939387956
commit
12877873b7
|
@ -811,17 +811,17 @@ final class interneturok extends core
|
||||||
// Exit (fail)
|
// Exit (fail)
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
function ($response) use ($homework) {
|
function ($exception) use ($homework) {
|
||||||
if ($response->getStatusCode() === 402) {
|
if ($exception->getResponse()?->getStatusCode() === 402) {
|
||||||
// Fail (received the "Payment Required" status code)
|
// Fail (received the "Payment Required" status code)
|
||||||
|
|
||||||
// Writing into the output buffer
|
// Writing into the output buffer
|
||||||
echo "Не удалось скачать домашнее задание $homework потому, что не оплачен тариф\n";
|
echo "Не удалось скачать домашнее задание $homework потому, что не оплачен тариф\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Exit (fail)
|
// Exit (fail)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue