Skip to content

fix: handle BadZipFile exception in extract_har.py (fixes #321) - #336

Closed
KooshaPari wants to merge 1 commit into
simonw:mainfrom
KooshaPari:fix-321-badzipfile
Closed

KooshaPari wants to merge 1 commit into
simonw:mainfrom
KooshaPari:fix-321-badzipfile

Conversation

@KooshaPari

Copy link
Copy Markdown

Fixes #321

Changes

  • Wrapped zipfile.ZipFile(harzip) in a try/except zipfile.BadZipFile block
  • Provides a user-friendly error message instead of crashing with an unhandled traceback
  • Validates zip file integrity before attempting to read HAR content

Copilot AI lite review requested due to automatic review settings September 13, 2026 05:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@KooshaPari KooshaPari closed this by deleting the head repository Sep 14, 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.

Unhandled exception / crash (zipfile.BadZipFile) on non-zip input in python/extract_har.py

2 participants