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