CHIMEFRB / workflow

🌊 Working in flowstate.
0 stars 0 forks source link

`NoneType` values in `delete` list cause HTTP request failure #137

Closed Afrokk closed 1 month ago

Afrokk commented 1 month ago

Description

The transfer daemon is trying to delete some works from Buckets, but the call is repeatedly failing:

{"description": "Bad Request", "status": 400, "message": "'NoneType' object is not iterable"}

This bug occurs when None values are present in the delete list, which causes a Bad Request error with the message: "NoneType' object is not iterable". This happens because the deletion process in the perform function does not filter out invalid None values before sending an HTTP request to delete the works.

Related Logs

delete in transfer
[None, None, None, None, None, None, None, None, None, None, None, None, None]
{"description": "Bad Request", "status": 400, "message": "'NoneType' object is not iterable"}

Steps to Reproduce

  1. Trigger a process that collects work["id"] from the bucket where work entries have None or invalid IDs.
  2. The delete list is populated with these None values.
  3. When the deletion step attempts to process the delete list, an HTTP request is sent with invalid None values.
  4. The server responds with a Bad Request error due to an invalid operation.

PR: #138