Skip to content

Commit

Permalink
Merge pull request #427 from iRail/development
Browse files Browse the repository at this point in the history
Deploy PR #425 and #426 to production
  • Loading branch information
Bertware committed Oct 18, 2020
2 parents ada513c + 676127d commit 424f20f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"require": {
"irail/stations": "^1.6.4",
"irail/stations": "^1.6.6",
"monolog/monolog": "^1.25",
"ptachoire/tac": "1.0.*",
"sebastian/environment": "4.2.*",
Expand All @@ -29,7 +29,7 @@
},
"require-dev": {
"phpunit/phpunit": "^8.5.8",
"guzzlehttp/guzzle": "^7.0",
"guzzlehttp/guzzle": "^7.2",
"symfony/process": "^v5.1"
},
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/api/data/NMBS/tools/HafasCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public static function throwExceptionOnInvalidResponse(array $json): void
if ($json['svcResL'][0]['err'] == "H890") {
throw new Exception('No results found', 404);
}
if ($json['svcResL'][0]['err'] == 'PROBLEMS') {
throw new Exception("Date likely outside of the timetable period. Check your query.", 400);
}
if ($json['svcResL'][0]['err'] != 'OK') {
throw new Exception("This request failed. Please check your query. Error code " . $json['svcResL'][0]['err'], 500);
}
Expand Down

0 comments on commit 424f20f

Please sign in to comment.