title: ASPNETCore API ExceptionFilterAttribute and IStringLocalizer
body: <p>I have a ExceptionFilterAttribute in my ASPNETCore API where I handle certain exception types.</p>
  
  <p>For example any UnauthorizedAccessException I return HttpStatusCode.Unauthorized, any KeyNotFoundException I return HttpStatusCode.NotFound etc.</p>
  
  <p>However, I'm also returning a basic message. For example, the string "Key Not Found" is returned with the HttpStatusCode.NotFound.</p>
  
  <p>I would like the messages contained in the ExceptionFilterAttribute to be parsed using the IStringLocalizer. However, a ExceptionFilterAttribute doesn't seem to support dependency injection.</p>
  
  <p>Has anyone encountered the same issue?</p>
  
  <p>Is there an approach here which is considered best practice?</p>