Commit Graph
1 Commits
Author SHA1 Message Date
Jack GreenandGitHub 8fd0e574d2 Improve error handling on authentication failure
When incorrect credentials are supplied, it's hard to reason this from the error produced:
```
% GITHUB_WORKSPACE=. \
INPUT_FROM=readme.md \
INPUT_TO=1 \
INPUT_CLOUD=hazelcast \
INPUT_USER=user@example.com \
INPUT_TOKEN=incorrect-token \
python3 src/main.py
Traceback (most recent call last):
  File "confluence-markdown-sync/src/main.py", line 47, in <module>
    'id': current['id'],
KeyError: 'id'
```

Instead, by checking the response we get a _hint_ where the problem might be:
```
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://hazelcast.atlassian.net/wiki/rest/api/content/1
```
2026-03-27 19:18:09 +00:00