luisgarciaalanis's avatar

Bad error code in BadRouteException is 0

Hello,

While debugging my code I found that the BadRouteException thrown when you have a bad route has the error code of 0. I think it should be 500 (internal server error).

dd($e); shows:

BadRouteException {#139 #message: "Static route "/api/v1/test/top" is shadowed by previously defined variable route "/api/v1/test/([^/]+)" for method "GET"" #code: 0 #file: "/home/vagrant/Code/lumen/prject/vendor/nikic/fast-route/src/DataGenerator/RegexBasedAbstract.php" #line: 64 ......

I have created an issue: https://github.com/nikic/FastRoute/issues/80

Thanks Luis

0 likes
0 replies

Please or to participate in this conversation.