requests.post has a status_code 200 even if a user already exists.. why?

klopukhina
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 29, 2018

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.

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events