In we create a Lambda that needs to list the members of a Team. The Lambda has no Synapse credentials so it can't call Synapse.login(). It needs to call Synapse.getTeamMembers() which uses an anonymous service to list the members of a team. (This is public information.). Currently the Python client requires logging in before making any requests. So The Lambda can't use getTeamMembers().
The change is to allow requests through rather than preemptively raising a SynapseAuthenticationError, if the backend returns a 401 or 403 when the call is made AND the user is not logged in then a SynapseAuthenticationError is raised.
This change has been merged to develop and will be in included in the next release candidate for validation.
Just verified the change – thanks !
Closing per Tess' comment.