Nicer error display
This commit is contained in:
parent
96fb2fd428
commit
38557fafa6
15 changed files with 53 additions and 32 deletions
|
|
@ -1,13 +1,16 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use TikScraper\Models\Meta;
|
||||
|
||||
class ErrorTemplate extends BaseTemplate {
|
||||
public Meta $error;
|
||||
public int $http_code = 502;
|
||||
public ?int $tiktok_code = -1;
|
||||
public string $msg = '';
|
||||
|
||||
function __construct(object $error) {
|
||||
|
||||
function __construct(int $http_code, string $msg, ?int $tiktok_code = null) {
|
||||
parent::__construct('Error');
|
||||
$this->error = $error;
|
||||
$this->http_code = $http_code;
|
||||
$this->msg = $msg;
|
||||
$this->tiktok_code = $tiktok_code;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue