Skip to content

Failure to validate subdirs when indludes_subdirs = true in lotman_update_lot_usage_by_dir #20

@jhiemstrawisc

Description

@jhiemstrawisc

When one of the input objects in a directory update object has the form:

{
    "includes_subdirs": true,
    "path": "lot2",
    "size_GB": 1234,
}

a cryptic error is thrown: [json.exception.type_error.305] cannot use operator[] with a string argument with number

This happens because the includes_subdirs = true causes LotMan to look for the subdirs key, which isn't present in this case.

We should handle this error and do a better job validating the input.

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