Squashed commit message
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
This commit is contained in:
24
backend/src/app/Exceptions/TelegramCustomerWriteNotAllowedException.php
Executable file
24
backend/src/app/Exceptions/TelegramCustomerWriteNotAllowedException.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
* Исключение, выбрасываемое когда пользователь не разрешил писать ему в PM
|
||||
*
|
||||
* @package App\Exceptions
|
||||
*/
|
||||
class TelegramCustomerWriteNotAllowedException extends RuntimeException
|
||||
{
|
||||
public function __construct(int $telegramUserId, ?\Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(
|
||||
"User {$telegramUserId} has not allowed writing to PM",
|
||||
400,
|
||||
$previous
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user