The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events