Show debug info when TikTok gives error

This commit is contained in:
Pablo Ferreiro 2023-10-07 00:17:11 +02:00
parent 3ba64be202
commit a3b4143ab1
5 changed files with 20 additions and 10 deletions

View file

@ -1,16 +1,20 @@
<?php
namespace App\Models;
use TikScraper\Models\Response;
class ErrorTemplate extends BaseTemplate {
public int $http_code = 502;
public ?int $tiktok_code = -1;
public string $msg = '';
public ?Response $response = null;
function __construct(int $http_code, string $msg, ?int $tiktok_code = null) {
function __construct(int $http_code, string $msg, ?int $tiktok_code = null, ?Response $response) {
parent::__construct('Error');
$this->http_code = $http_code;
$this->msg = $msg;
$this->tiktok_code = $tiktok_code;
$this->response = $response;
}
}