Fatal error: Uncaught TypeError: {closure:/home/stupidh/app/routes/api.php:62}(): Argument #1 ($ex) must be of type Exception, TypeError given in /home/stupidh/app/routes/api.php:62 Stack trace: #0 [internal function]: {closure:/home/stupidh/app/routes/api.php:62}(Object(TypeError)) #1 /home/stupidh/vendor/flight/core/Dispatcher.php(356): call_user_func_array(Object(Closure), Array) #2 /home/stupidh/vendor/flight/core/Dispatcher.php(289): flight\core\Dispatcher->invokeCallable(Object(Closure), Array) #3 /home/stupidh/vendor/flight/core/Dispatcher.php(133): flight\core\Dispatcher->execute(Object(Closure), Array) #4 /home/stupidh/vendor/flight/core/Dispatcher.php(97): flight\core\Dispatcher->runEvent('error', Array) #5 /home/stupidh/vendor/flight/Engine.php(154): flight\core\Dispatcher->run('error', Array) #6 /home/stupidh/vendor/flight/Engine.php(264): flight\Engine->__call('error', Array) #7 [internal function]: flight\Engine->handleException(Object(TypeError)) #8 {main} thrown in /home/stupidh/app/routes/api.php on line 62