Skip to content

Broad exception handling masks errors in create_ci_badge.py #513

@brianredbeard

Description

@brianredbeard

Description

The get_ocp_version() function uses a bare except Exception block that catches all exceptions, making debugging difficult and potentially masking important errors.

Location

https://github.com/validatedpatterns/multicloud-gitops/blob/main/tests/interop/create_ci_badge.py#L46-L49

except Exception:
    print("Error getting OpenShift version")
    return None

Expected Behavior

Catch specific exceptions and log the error type and message for debugging.

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