/** * Create the exception from a MQTTResponse object * * @param HttpResponse $response */ public function __construct(MQTTResponse $response) { $data = $response->json(); $this->response = $response; parent::__construct(current($data), $response->statusCode); }