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

Error Handling in ESI Route Status Middleware #915

Open
Crypta-Eve opened this issue Jan 16, 2025 · 0 comments · May be fixed by eveseat/eveapi#418
Open

Error Handling in ESI Route Status Middleware #915

Crypta-Eve opened this issue Jan 16, 2025 · 0 comments · May be fixed by eveseat/eveapi#418
Assignees
Labels
complexity/low This task has a low complexity level
Milestone

Comments

@Crypta-Eve
Copy link
Member

Bad responses or partial bad responses from the route checker middleware can result in log spam due to insufficient error handling. See log below

[2025-01-16 04:00:21] local.ERROR: Attempt to read property "route" on string {"exception":"[object] (ErrorException(code: 0): Attempt to read property \"route\" on string at /var/www/seat/packages/eveapi/src/Jobs/Middleware/CheckEsiRouteStatus.php:105)
[stacktrace]
#0 /var/www/seat/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'Attempt to read...', '/var/www/seat/p...', 105)
#1 /var/www/seat/packages/eveapi/src/Jobs/Middleware/CheckEsiRouteStatus.php(105): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}(2, 'Attempt to read...', '/var/www/seat/p...', 105)
#2 /var/www/seat/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(396): Seat\\Eveapi\\Jobs\\Middleware\\CheckEsiRouteStatus->Seat\\Eveapi\\Jobs\\Middleware\\{closure}()
#3 /var/www/seat/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(429): Illuminate\\Cache\\Repository->remember('esi-route-statu...', 300, Object(Closure))
#4 /var/www/seat/packages/eveapi/src/Jobs/Middleware/CheckEsiRouteStatus.php(93): Illuminate\\Cache\\CacheManager->__call('remember', Array)
#5 /var/www/seat/packages/eveapi/src/Jobs/Middleware/CheckEsiRouteStatus.php(69): Seat\\Eveapi\\Jobs\\Middleware\\CheckEsiRouteStatus->isRouteOnline('/characters/{ch...')
#6 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckEsiRouteStatus->handle(Object(Seat\\Eveapi\\Jobs\\Character\\Notifications), Object(Closure))
#7 /var/www/seat/packages/eveapi/src/Jobs/Middleware/CheckServerStatus.php(55): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Seat\\Eveapi\\Jobs\\Character\\Notifications))
#8 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckServerStatus->handle(Object(Seat\\Eveapi\\Jobs\\Character\\Notifications), Object(Closure))
#9 /var/www/seat/packages/eveapi/src/Jobs/Middleware/CheckEsiRateLimit.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Seat\\Eveapi\\Jobs\\Character\\Notifications))
#10 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Seat\\Eveapi\\Jobs\\Middleware\\CheckEsiRateLimit->handle(Object(Seat\\Eveapi\\Jobs\\Character\\Notifications), Object(Closure))
#11 /var/www/seat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Seat\\Eveapi\\Jobs\\Character\\Notifications))
#12 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(122): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#13 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Seat\\Eveapi\\Jobs\\Character\\Notifications))
#14 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\RedisJob), Array)
#15 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(439): Illuminate\\Queue\\Jobs\\Job->fire()
#16 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(389): Illuminate\\Queue\\Worker->process('redis', Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Illuminate\\Queue\\WorkerOptions))
#17 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(176): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\RedisJob), 'redis', Object(Illuminate\\Queue\\WorkerOptions))
#18 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(137): Illuminate\\Queue\\Worker->daemon('redis', 'notifications', Object(Illuminate\\Queue\\WorkerOptions))
#19 /var/www/seat/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(120): Illuminate\\Queue\\Console\\WorkCommand->runWorker('redis', 'notifications')
#20 /var/www/seat/vendor/laravel/horizon/src/Console/WorkCommand.php(51): Illuminate\\Queue\\Console\\WorkCommand->handle()
#21 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\\Horizon\\Console\\WorkCommand->handle()
#22 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#23 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#24 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#25 /var/www/seat/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#26 /var/www/seat/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call(Array)
#27 /var/www/seat/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#28 /var/www/seat/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#29 /var/www/seat/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#30 /var/www/seat/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand(Object(Laravel\\Horizon\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#31 /var/www/seat/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#32 /var/www/seat/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#33 /var/www/seat/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#34 {main}
"}
@Crypta-Eve Crypta-Eve added the complexity/low This task has a low complexity level label Jan 16, 2025
@Crypta-Eve Crypta-Eve added this to the 5.0 milestone Jan 16, 2025
@Crypta-Eve Crypta-Eve self-assigned this Jan 16, 2025
@Crypta-Eve Crypta-Eve linked a pull request Jan 22, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity/low This task has a low complexity level
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant