mirror of
https://github.com/cupcakearmy/confluence-markdown-sync.git
synced 2026-04-09 15:17:14 +00:00
Merge pull request #10 from JackPGreen/patch-1
Improve error handling on authentication failure
This commit is contained in:
@@ -33,7 +33,9 @@ if '://' in base_url: # It's a full URL
|
||||
else: # It's a subdomain
|
||||
url = f"https://{base_url}.atlassian.net/wiki/rest/api/content/{envs['to']}"
|
||||
|
||||
current = requests.get(url, auth=(envs['user'], envs['token'])).json()
|
||||
response = requests.get(url, auth=(envs['user'], envs['token']))
|
||||
response.raise_for_status()
|
||||
current = response.json()
|
||||
|
||||
html = markdown(md, extensions=[GithubFlavoredMarkdownExtension()])
|
||||
content = {
|
||||
|
||||
Reference in New Issue
Block a user