Skip to content

Refactor: Fix blind exceptions (BLE001) and clean up stale linter ignores in pyproject.toml #581

Description

@bijanmurmu

Describe the issue

In pyproject.toml, there is a TODO section where several Ruff linter rules are ignored, including:

  • BLE001 (blind exceptions)
  • S108 (hardcoded temporary file usage)
  • FAST003 (unused FastAPI path parameters)

Currently, there are 11 instances of except Exception: across the codebase. Catching broad exceptions is generally considered an anti-pattern because it can mask unexpected bugs and make debugging more difficult.

These occurrences should be replaced with more specific exception handling where appropriate (for example, OSError, ValueError, or HTTPException). Once addressed, the corresponding stale ignore rules can be removed from pyproject.toml.

I'd love to work on this issue and submit a PR. Could you assign it to me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions