title: How to handle 401 unauthorized error in Springboot app
body: <p>I need to log 401 unauthorized errors in my Springboot application.
  I wanted to log this for a certain end point in my app since its unauthorized error I know this attempt will be caught when invoking the api at the beginning itself.</p>
  <p>Are there anyways I can keep track of this in spring boot?
  I tried through WebSecurityConfig but didnt help.</p>
  <p>I am using springboot 2.</p>
  <p>Thanks in advance.</p>