I'm trying to handle the situation, when a user is already registered at bitbucket, and when requests.post is sent again, the error message should notify an admin that the user is already registered. But my status_code is 200 when I'm sending the invitation second time (even if the user has already accepted the invitation and created an account).
answer = requests.post(url, auth=(getKey(configMap),getSecret(configMap)), data=data)
What could be the issue?
Ideally, I would love to handle also the situation when the invitation was already sent to this user, but the user did not register the account yet. I would love to arrange an error message for admin explaining this situation.