Skip to content

feat: add PasswordProtectedArchiveError for password-protected archive submissions#179

Merged
davidt99 merged 1 commit into
masterfrom
feat/password-protected-archive-error
Jul 6, 2026
Merged

feat: add PasswordProtectedArchiveError for password-protected archive submissions#179
davidt99 merged 1 commit into
masterfrom
feat/password-protected-archive-error

Conversation

@davidt99

@davidt99 davidt99 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

User description

What

Adds a dedicated PasswordProtectedArchiveError, raised when the server rejects a submitted archive because it is password protected.

Why

Previously this surfaced as a generic ServerError, so callers had to string-match the error message to detect the case. A typed exception gives callers a clean, stable way to handle password-protected archives.

PasswordProtectedArchiveError subclasses ServerError, so existing except ServerError handlers keep working unchanged.

Changes

  • intezer_sdk/errors.py — new PasswordProtectedArchiveError(ServerError).
  • intezer_sdk/_api.py — raise it in the analysis BAD_REQUEST handling, mirroring the existing typed-error checks (e.g. InvalidUrlError).
  • Unit tests covering the new exception and the ServerError subclass contract.
  • CHANGES entry; version 1.27.41.27.5.

Tests

pytest tests/unit → 230 passed.

🤖 Generated with Claude Code


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Introduce PasswordProtectedArchiveError within the SDK error handling stack so the analysis flow can raise a specific exception when archives are password protected and release metadata reflects version 1.27.5. Ensure _api raises it alongside other typed server errors, giving callers a stable way to detect these cases and keeping existing ServerError handlers compatible.

TopicDetails
Test coverage Validate the new exception and its ServerError inheritance via unit tests that simulate a password-protected archive response.
Modified files (1)
  • tests/unit/test_file_analysis.py
Latest Contributors(2)
UserCommitDate
tufik@intezer.comfeat: add PasswordProt...July 06, 2026
davidtufik@gmail.comfix(analysis): Raise `...August 03, 2023
Archive error handling Add PasswordProtectedArchiveError handling mirroring other typed ServerError cases so password-protected archives trigger a clear, dedicated exception and the versioning/changes log reflects the new behavior.
Modified files (4)
  • CHANGES
  • intezer_sdk/__init__.py
  • intezer_sdk/_api.py
  • intezer_sdk/errors.py
Latest Contributors(2)
UserCommitDate
tufik@intezer.comfeat: add PasswordProt...July 06, 2026
or.saiag@intezer.comfeat/TKT 15221 add ale...May 25, 2026
Review this PR on Baz | Customize your next review

…e submissions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@davidt99 davidt99 merged commit 668f109 into master Jul 6, 2026
8 checks passed
@davidt99 davidt99 deleted the feat/password-protected-archive-error branch July 6, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants