- no fallback to "custom route search algorithm" in case ESI returns "no route round" error http 404

This commit is contained in:
Mark Friedrich
2018-06-09 20:55:41 +02:00
parent 452b7823df
commit 9c3ad25959

View File

@@ -412,7 +412,9 @@ class Route extends Controller\AccessController {
// search root by ESI API
$routeData = $this->searchRouteESI($systemFromId, $systemToId, $searchDepth, $mapIds, $filterData);
if( !empty($routeData['error']) ){
// Endpoint return http:404 in case no route find (e.g. from inside a wh)
// we thread that error "no route found" as a valid response! -> no fallback to custom search
if( !empty($routeData['error']) && strtolower($routeData['error']) !== 'no route found' ){
// ESI route search has errors -> fallback to custom search implementation
$routeData = $this->searchRouteCustom($systemFromId, $systemToId, $searchDepth, $mapIds, $filterData);
}