refactor: log lookup information when retrieving a domain's configuration fails or when we serve a 500
The following discussion from !674 (merged) should be addressed:
-
@vshushlin started a discussion: (+1 comment) I feel bad about deleting this function. But I couldn't find a way to inject these log fields into access logger.
Currently, it works because access logger middleware works after routing middleware, so we already have information about domain and lookup path.
If we switch the order of middlewares, then we can't longer pass domain information through context.
If you have a good idea how to pass information from bottom middleware to the upper one, I'd love to hear it!