Skip to content

[BUG] Misleading error message if plan has invalid JSON #28

@mluttrell

Description

@mluttrell

Describe the bug
When the tool is run against a plan with invalid JSON, another exception occurs:

AttributeError: 'Namespace' object has no attribute 'plan'

This is due to this line that appears to reference an invalid/non-existent "plan" parameter: https://github.com/awslabs/terraform-iam-policy-validator/blob/main/iam_check/iam_check.py#L35

To Reproduce
Steps to reproduce the behavior:

  1. Run the tool against a file with invalid JSON

Expected behavior
An error message that tells me my JSON is invalid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions