feat: add PasswordProtectedArchiveError for password-protected archive submissions#179
Merged
Merged
Conversation
…e submissions Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
almogch
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.PasswordProtectedArchiveErrorsubclassesServerError, so existingexcept ServerErrorhandlers keep working unchanged.Changes
intezer_sdk/errors.py— newPasswordProtectedArchiveError(ServerError).intezer_sdk/_api.py— raise it in the analysisBAD_REQUESThandling, mirroring the existing typed-error checks (e.g.InvalidUrlError).ServerErrorsubclass contract.CHANGESentry; version1.27.4→1.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
PasswordProtectedArchiveErrorwithin 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_apiraises it alongside other typed server errors, giving callers a stable way to detect these cases and keeping existingServerErrorhandlers compatible.ServerErrorinheritance via unit tests that simulate a password-protected archive response.Modified files (1)
Latest Contributors(2)
PasswordProtectedArchiveErrorhandling mirroring other typedServerErrorcases so password-protected archives trigger a clear, dedicated exception and the versioning/changes log reflects the new behavior.Modified files (4)
Latest Contributors(2)