diff --git a/src/Client/SocketMode.php b/src/Client/SocketMode.php index dacb797..d5cc54d 100644 --- a/src/Client/SocketMode.php +++ b/src/Client/SocketMode.php @@ -95,6 +95,7 @@ class SocketMode extends API return $this->websocket->open(); }, function($exception) use ($deferred) { + Log::error(sprintf('%s:! Could not connect to Slack API [%s]...',self::LOGKEY,$exception->getMessage()),['m'=>__METHOD__]); // if connection was not successful $deferred->reject(new ConnectionException( 'Could not connect to Slack API: '.$exception->getMessage(), @@ -118,6 +119,14 @@ class SocketMode extends API 'Could not connect to WebSocket: '.$data['error']['msg'], $data['error']['code'])); }); + + }, function($exception) use ($deferred) { + Log::error(sprintf('%s:! Could not connect to Slack API [%s]...',self::LOGKEY,$exception->getMessage()),['m'=>__METHOD__]); + // if connection was not successful + $deferred->reject(new ConnectionException( + 'Could not connect to Slack API: '.$exception->getMessage(), + $exception->getCode() + )); }); return $deferred->promise();