Oftentimes, we meet this error in production, which is too verbose and not explicit enough:
... WRK-00 ERROR Error connecting to backend: failed to retrieve the cluster: failed to retrieve the frontend for the request: no cluster found
This PR changes the signature of Router::lookup() to return a Result<Route, RouterError instead of Option<Route>.
The RouterError::NoRouteFound is logged in an explicit manner: METHOD uri path
. On top of that, I shortened the redundant parts of the log for better readability:
... WRK-00 ERROR Error connecting to backend: failed to retrieve the cluster: no cluster: GET localhost /
Oftentimes, we meet this error in production, which is too verbose and not explicit enough:
This PR changes the signature of
Router::lookup()
to return aResult<Route, RouterError
instead ofOption<Route>
. TheRouterError::NoRouteFound
is logged in an explicit manner: METHOD uri path . On top of that, I shortened the redundant parts of the log for better readability:this will make debugging easier in production.