GuzzleHttp http_errors dapatkan

public function getTracking(string $search)
    {
        try {
            $data = $this->client->get($this->tracking_request_url.$search.'/history_items');
        } catch (\Exception $exception) {
            $data = null;
        }
        if (is_null($data)) {
            return $this->page_container->setPage(new TrackingPageViewModel());
        } else {
            return $this->page_container->setPage(new TrackingPageViewModel(json_decode($data->getBody()->getContents(), true)));

        }

    }
Shadow