Skip to content

Implement authentication error handling in client.py#42

Closed
vivan070707-ctrl wants to merge 1 commit intoAxmeAI:mainfrom
vivan070707-ctrl:patch-2
Closed

Implement authentication error handling in client.py#42
vivan070707-ctrl wants to merge 1 commit intoAxmeAI:mainfrom
vivan070707-ctrl:patch-2

Conversation

@vivan070707-ctrl
Copy link

Added error handling for 401 and 403 status codes.

Added error handling for 401 and 403 status codes.
@vivan070707-ctrl
Copy link
Author

Updated implementation in _request_json as suggested. Please review.

@George-iam
Copy link
Contributor

Thanks for the effort! However this PR has a couple of issues:

  1. The auth check is inside the retry loop in _request_json() - but auth failures should not be retried (they'll fail the same way every time).
  2. This duplicates the logic already in _raise_http_error() which is called further down the flow.
  3. Missing **kwargs in AxmeAuthError() - loses body, request_id, trace_id.

PR #41 is the better approach (fixing _raise_http_error). Let's focus the work there. Closing this one in favor of #41.

@George-iam George-iam closed this Mar 24, 2026
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

Successfully merging this pull request may close these issues.

2 participants