Skip to content

Improve error handling #13

Open
Open
@kzscisoft

Description

@kzscisoft

Currently the code assumes in many places that variables are in the correct state when accessing indexes etc, exceptions can be used to make sure the code is terminated when this is not the case, e.g.:

Traceback (most recent call last):
  File "/home/runner/work/FAIR-CLI/FAIR-CLI/python_example/src/org/fairdatapipeline/simpleModel/ext/SEIRSModelRun.py", line 13, in <module>
    initial_parameters = pipeline.link_read(handle, 'SEIRS_model/parameters')
  File "/home/runner/.cache/pypoetry/virtualenvs/fair-cli-AKUYcvYQ-py3.9/lib/python3.9/site-packages/org/fairdatapipeline/api/common/link_read.py", line 88, in link_read
    id = fdp_utils.extract_id(data_product_response[0]['object'])
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions