I’m using the following code below. How do you check for a valid authentication? If I give it a valid email it works fine but if I give it a bad one it doesn’t error. Only thing is that later queries say
The value ‘IT’ does not exist for the field ‘project’.
Field ‘IT Queue’ does not exist or this field cannot be viewed by anonymous users.
Is there some way I can either get an error about an invalid login OR something in the returning JSON I can check to ensure the login is correct?
from atlassian import Jira
_JIRA_API_KEY = 'xxxxxx' # https://id.atlassian.com/manage-profile/security/api-tokens
_JIRA_URL = 'https://mysite.atlassian.net'
class MyJira():
def __init__(self, user):
j = Jira(
url=_JIRA_URL,
username=user,
password=_JIRA_API_KEY,
cloud=True)
self.jira = j
j = MyJira('xxxx@yyyy.com')