Skip to content

fix: startup crash when version.json is present but malformed or missing version key #2770

Description

@huyhoang171106

Description

get_release() only handles FileNotFoundError. If version.json exists but contains invalid JSON (e.g., partial write, packaging issue) or lacks the version field, json.JSONDecodeError/KeyError will propagate during Django settings import and prevent the app from starting.

Severity: high
File: sandbox/settings.py

Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions