1
0
Fork 0

fixed 402 reponse error

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2025-03-08 20:42:39 +07:00
parent 1939387956
commit 12877873b7

View File

@ -811,17 +811,17 @@ 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;
}
}
);
}