Skip to content

FIX: Preserve text errors for initializer 403 responses#2094

Merged
romanlutz merged 2 commits into
microsoft:mainfrom
biefan:fix/initializer-403-detail
Jun 29, 2026
Merged

FIX: Preserve text errors for initializer 403 responses#2094
romanlutz merged 2 commits into
microsoft:mainfrom
biefan:fix/initializer-403-detail

Conversation

@biefan

@biefan biefan commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reuse response-detail extraction for initializer registration 403 responses.
  • Fall back to plain text response bodies when a server or proxy returns non-JSON errors.
  • Add regression coverage for plain-text 403 responses during initializer registration.

Tests

  • uv run -m pytest tests/unit/cli/test_api_client.py tests/unit/cli -q
  • uv run -m ty check pyrit/cli/api_client.py tests/unit/cli/test_api_client.py
  • uv run pre-commit run --files pyrit/cli/api_client.py tests/unit/cli/test_api_client.py

@romanlutz romanlutz enabled auto-merge June 29, 2026 13:50
@romanlutz romanlutz added this pull request to the merge queue Jun 29, 2026
Merged via the queue into microsoft:main with commit e5244df Jun 29, 2026
53 checks passed
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