diff --git a/lib/Transport/API.php b/lib/Transport/API.php index 6e9c555..1c48a68 100644 --- a/lib/Transport/API.php +++ b/lib/Transport/API.php @@ -170,13 +170,12 @@ public function getStationBoard(StationBoardQuery $query) // send request $result = $this->sendAndParseQuery($query); - // check for API messages - if (isset($result->messages) && is_array($result->messages)) { - throw new \Exception('Messages from timetable.search.ch: '.implode($result->messages)); + if (isset($result->stop)) { + $station = Station::createStationFromJson($result->stop); + } else { + $station = null; } - $station = Station::createStationFromJson($result->stop); - $journeys = []; if ($result->connections) {