Log Server Error
kristinapathak opened this issue · comments
Kristina Pathak commented
The Error Encoder has the most knowledge about the error as it has been decorated up the stack, so we want to log it. We can also log the status code being returned for this request, which may not be logged anywhere else.
Line 220 in 93c79d0
We gain access to a logger by acquiring it from the context passed to the error encoder. Then, the logger will also be decorated with other request-specific fields.