From b1a55a1bd8688affe1356d84895b6432a8caeaff Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Fri, 22 Dec 2023 14:05:23 +0000 Subject: [PATCH] wip --- src/Exceptions/InvalidApplication.php | 11 ++--------- src/Exceptions/InvalidOrigin.php | 11 ++--------- src/Pusher/Exceptions/InvalidOrigin.php | 22 ++++++++++++++++++++++ src/Pusher/Server.php | 8 +++----- src/Servers/ApiGateway/Server.php | 2 +- 5 files changed, 30 insertions(+), 24 deletions(-) create mode 100644 src/Pusher/Exceptions/InvalidOrigin.php diff --git a/src/Exceptions/InvalidApplication.php b/src/Exceptions/InvalidApplication.php index 1fc72c19..e1a33ddf 100644 --- a/src/Exceptions/InvalidApplication.php +++ b/src/Exceptions/InvalidApplication.php @@ -2,17 +2,10 @@ namespace Laravel\Reverb\Exceptions; -use Laravel\Reverb\Pusher\Exceptions\PusherException; +use Exception; -class InvalidApplication extends PusherException +class InvalidApplication extends Exception { - /** - * The error code associated with the exception. - * - * @var int - */ - protected $code = 4001; - /** * The error message associated with the exception. * diff --git a/src/Exceptions/InvalidOrigin.php b/src/Exceptions/InvalidOrigin.php index 5f50da90..4f713eae 100644 --- a/src/Exceptions/InvalidOrigin.php +++ b/src/Exceptions/InvalidOrigin.php @@ -2,17 +2,10 @@ namespace Laravel\Reverb\Exceptions; -use Laravel\Reverb\Pusher\Exceptions\PusherException; +use Exception; -class InvalidOrigin extends PusherException +class InvalidOrigin extends Exception { - /** - * The error code associated with the exception. - * - * @var int - */ - protected $code = 4009; - /** * The error message associated with the exception. * diff --git a/src/Pusher/Exceptions/InvalidOrigin.php b/src/Pusher/Exceptions/InvalidOrigin.php new file mode 100644 index 00000000..a5e61c6c --- /dev/null +++ b/src/Pusher/Exceptions/InvalidOrigin.php @@ -0,0 +1,22 @@ +connectionId(), - $e->message() + $e->getMessage() ); } catch (\Exception $e) { $this->server->error(