For example, BearerTokenAuthSchemeSelector throws a OAuth2AuthenticationException if a bearer token is malformed. Since the error handler is not consulted, we cannot remap this exception. As a consequence, our service returns the code Unknown, although it should be Unauthorized.