Skip to content

Don't retry all 401's and add a session handler#11

Merged
carlosfunk merged 2 commits into
mainfrom
feat/session-pooling
Jun 9, 2026
Merged

Don't retry all 401's and add a session handler#11
carlosfunk merged 2 commits into
mainfrom
feat/session-pooling

Conversation

@carlosfunk

Copy link
Copy Markdown
Member

Closes #9

@carlosfunk carlosfunk requested a review from beneboy June 9, 2026 02:56
Carl Robben added 2 commits June 9, 2026 16:40
- BaseClient and IfmClient each build one requests.Session at construction and route every send through it
- Session-wide verify default set once; per-call Authorization headers still merged at request time
- _build_session helper centralises the verify default so new endpoints can't forget the flag
- verify_ssl tests repointed at client._session.request to reflect the new dispatch site
- A 401 on a requires_authorization=False call now surfaces as-is instead of triggering a re-auth and replay
- Anonymous 401s (e.g. admin-install on an already-configured instance) no longer misreport as bad credentials
- Avoids a wasted login round-trip on calls the caller explicitly marked as not needing auth
- Test asserts a single request and no /api/auth/token/login/ replay on an anonymous 401

Closes #9
@carlosfunk carlosfunk force-pushed the feat/session-pooling branch from 79f462f to c7b35ab Compare June 9, 2026 04:40
@carlosfunk carlosfunk merged commit a8ddadb into main Jun 9, 2026
8 checks passed
@carlosfunk carlosfunk deleted the feat/session-pooling branch June 9, 2026 04:41
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.

Don't retry calls on 401 errors when requires_authorization=False

2 participants