Closed
Description
Token Service will throw an InvalidStateException if a wrong access token is used as a Bearer token for authentication and this gets translated to a 500 error response. We should be handling this correctly and return a 401 Unauthorized instead.
Relates : elastic/kibana#22905