diff --git a/src/GcrPubSubQueue.php b/src/GcrPubSubQueue.php index f32166f..e8d2619 100644 --- a/src/GcrPubSubQueue.php +++ b/src/GcrPubSubQueue.php @@ -2,7 +2,6 @@ namespace RichanFongdasen\GCRWorker; -use ErrorException; use Google\Cloud\PubSub\Message; use Kainxspirits\PubSubQueue\Connectors\PubSubConnector; use RichanFongdasen\GCRWorker\Concerns\CreatesPubSubQueue; @@ -39,8 +38,6 @@ public function acknowledge(Message $message): void * * @param Message $original * - * @throws ErrorException - * * @return Message */ public function pullFreshMessage(Message $original): Message @@ -59,6 +56,6 @@ public function pullFreshMessage(Message $original): Message } } - throw new ErrorException(sprintf('Failed to pull a PubSub message with id "%s"', $original->id())); + abort(409, sprintf('Failed to pull a PubSub message with id "%s"', $original->id())); } }