$this->select, 'results' => $this->results, 'search' => $this->search, ]); $response = $service->thirdList($params); $this->data = $response['data'] ?? []; $this->metadata = $response['metadata'] ?? null; $this->errorMessage = $response['error'] ?? null; } catch (LogisticsApiException $e) { $this->errorMessage = $e->getMessage(); $this->data = []; } catch (\Throwable $e) { $this->errorMessage = "Erreur inattendue : {$e->getMessage()}"; $this->data = []; } } public function getArtHistory(): void { if (blank($this->historyThirdId)) { return; } try { $service = app(LogisticsService::class); $response = $service->thirdGetArtHistory($this->historyThirdId); $this->historyData = $response['data'] ?? []; $this->errorMessage = $response['error'] ?? null; } catch (LogisticsApiException $e) { $this->errorMessage = $e->getMessage(); $this->historyData = []; } catch (\Throwable $e) { $this->errorMessage = "Erreur inattendue : {$e->getMessage()}"; $this->historyData = []; } } }