Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Better errors for invalid payloads #40

Description

@jkeifer

If no id is specified in the input payload, then we run https://github.com/cirrus-geo/cirrus-lib/blob/main/src/cirrus/lib/process_payload.py#L154. However, if we are also using a process array for workflow chaining, the line assigning the id fails with the following traceback:

[ERROR] TypeError: list indices must be integers or slices, not str
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 60, in lambda_handler
    payloads.append(ProcessPayload(payload, update=True))
  File "/var/task/cirrus/lib/process_payload.py", line 59, in __init__
    self.update()
  File "/var/task/cirrus/lib/process_payload.py", line 155, in update
    self['id'] = f"{collections_str}/workflow-{self.process['workflow']}/{items_str}"

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