throw new \Exception('Il y a une erreur !');
Voir :
try { $response = $this->get($uri); } catch (\Exception $e) { // Penser à logger l'erreur. return ['error' => 'Les informations ne sont pas disponibles pour le moment.']; }