Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal sever error when no trips could be found in a liveboard #142

Open
Tjoosten opened this issue Aug 22, 2015 · 4 comments
Open

Comments

@Tjoosten
Copy link
Contributor

Hi i caught a 500 internal server error here

i've already tested this on my local branch and i get this error slack:

[2015-08-23 01:48:29] local.ERROR: exception 'ErrorException' with message 'Undefined property: stdClass::$departures' in /Users/tim/Desktop/hyperRail-defuq/app/hyperRail/FormatConvertor.php:31
Stack trace:
#0 /Users/tim/Desktop/hyperRail-defuq/app/hyperRail/FormatConvertor.php(31): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined prope...', '/Users/tim/Desk...', 31, Array)
#1 /Users/tim/Desktop/hyperRail-defuq/app/Http/Controllers/StationController.php(311): App\hyperRail\FormatConverter::convertLiveboardData('{"version":"1.1...', '008821907')
#2 [internal function]: App\Http\Controllers\StationController->liveboard('008821907')
#3 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(256): call_user_func_array(Array, Array)
#4 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('liveboard', Array)
#5 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\StationController), Object(Illuminate\Routing\Route), 'liveboard')
#6 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#7 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#8 /Users/tim/Desktop/hyperRail-defuq/app/Http/Middleware/Language.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#9 [internal function]: App\Http\Middleware\Language->handle(Object(Illuminate\Http\Request), Object(Closure))
#10 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#11 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#12 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#13 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#14 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(69): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\StationController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'liveboard')
#15 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/Route.php(201): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\\Http\\Contro...', 'liveboard')
#16 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#17 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/Router.php(704): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#18 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#19 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#20 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#21 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#22 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/Router.php(706): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#23 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/Router.php(671): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#24 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Routing/Router.php(631): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#25 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#26 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#27 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#28 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#29 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#30 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#31 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(54): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#33 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#34 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#36 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#37 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#38 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#40 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#43 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#46 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#47 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#48 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#49 /Users/tim/Desktop/hyperRail-defuq/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#50 /Users/tim/Desktop/hyperRail-defuq/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#51 /Users/tim/Desktop/hyperRail-defuq/server.php(21): require_once('/Users/tim/Desk...')
#52 {main}  
@pietercolpaert
Copy link
Member

Right now it works fine, at 02:00 am however, there JSON structure retrieved from api.irail.be is different. See for example: http://api.irail.be/liveboard/?format=json&lang=NL&station=turnhout&fast=true&time=02:00. We should be able to handle this as well.

Solution

Handle when the liveboard is empty and give an appropriate message in the view

@pietercolpaert pietercolpaert changed the title 500 Internal sever error on https://irail.be/stations/NMBS/008821907 500 Internal sever error when no trips could be found in a liveboard Aug 23, 2015
@Tjoosten
Copy link
Contributor Author

Alright. I will try to work on something for this.

@pietercolpaert This also affects the TravisCI testing part on the PR's

@pietercolpaert
Copy link
Member

@Tjoosten any news on this? There seem to be a couple of issues that you assigned yourself to but we have not heard anything about it any more. Please also indicate if you want someone else to fix this issue, otherwise it's going to be open for a lot of more time.

@Tjoosten
Copy link
Contributor Author

Tjoosten commented Jul 22, 2016

@pietercolpaert I can give u a update later this day. Currently I'm on my work. And I have not the tools to dig into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants