joystream icon indicating copy to clipboard operation
joystream copied to clipboard

Colossus: explicitly handle nonexistent asset case

Open kdembler opened this issue 3 years ago • 1 comments

Problem

If I try to upload asset (identified by (bagId, dataObjectId) pair) that doesn't exist (at least one of the IDs is wrong), Colossus will actually not let me know. Instead, as seen below, the upload will fail at asset size verification, telling me that there's size mismatch, when the nature of error is actually quite different.

https://github.com/Joystream/joystream/blob/97b311f071f6f76b5de78da281d88188466c63ce/storage-node/src/services/webApi/controllers/filesApi.ts#L272-L279

Proposal

We should explicitly handle the case where dataObject wasn't found and provide meaningful error message to help with debugging.

┆Issue is synchronized with this Asana task by Unito

kdembler avatar Sep 13 '22 12:09 kdembler

Adding to mainnet scope, great find :)

bedeho avatar Sep 20 '22 04:09 bedeho

Done.

bedeho avatar Nov 17 '22 16:11 bedeho