You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What should be a 404 ends up being a 500 with a traceback like
[ERROR] TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 161, in lambda_handler
item = statedb.dbitem_to_item(statedb.get_dbitem(payload_id))
File "/var/task/cirrus/lib2/statedb.py", line 570, in dbitem_to_item
state, updated = dbitem["state_updated"].split("_")
That statedb.get_dbitem() call is typed to return a dict, but can also return None (https://github.com/cirrus-geo/cirrus-geo/blob/main/src/cirrus/lib2/statedb.py#L83). That we are indiscriminately passing the return value of that function into statedb.dbitem_to_item(), which expects an item dict, not None, is the basis for this exception.
The text was updated successfully, but these errors were encountered:
What should be a 404 ends up being a 500 with a traceback like
That
statedb.get_dbitem()
call is typed to return a dict, but can also returnNone
(https://github.com/cirrus-geo/cirrus-geo/blob/main/src/cirrus/lib2/statedb.py#L83). That we are indiscriminately passing the return value of that function intostatedb.dbitem_to_item()
, which expects an item dict, notNone
, is the basis for this exception.The text was updated successfully, but these errors were encountered: