Fix for handling error response from authentication provider