Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround 401 Errors w/ Jira API #298

Open
adhil0 opened this issue Aug 9, 2024 · 0 comments
Open

Workaround 401 Errors w/ Jira API #298

adhil0 opened this issue Aug 9, 2024 · 0 comments

Comments

@adhil0
Copy link
Collaborator

adhil0 commented Aug 9, 2024

Every so often, we receive an error when interacting with are Jira instance that says something like:
401 Unauthorized: os_authType was 'any' and an invalid cookie was sent. According to https://developer.atlassian.com/server/framework/atlassian-sdk/rest-and-os-authtype/, if we don't provide a user/pass and the cookie is invalid, the call will fail. For security purposes, our instance doesn't use user/pass, so once the cookie expires, it will fail.

We can try something similar to this: https://github.com/pycontribs/jira/blob/09750538a6f10cfe38fd6d1b284bf26f11728b86/jira/client.py#L279. Basically detect 401 errors and retry. There are some examples I've found in our internal Gitlab, contact me if you'd like a link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant