ui-monorepo icon indicating copy to clipboard operation
ui-monorepo copied to clipboard

Show reason while unable to unpin a CID

Open sadiq1971 opened this issue 2 years ago • 3 comments

Describe the bug There is a certain scenario where user cannot unpin a cid even if the status is pinned. From the api the error message is being returned is this cid is being pinned to another ipfs node, cannot update until the operation is finished with HTTP status code as Forbidden. So, from the UI when user click on unpin, nothing happen until you open the inspection on browser.

To Reproduce Steps to reproduce the behavior:

  1. Go to the storage
  2. Pin a CID
  3. Wait until the status is pinned.
  4. Open the inspect element and try to unpin the cide

Expected behavior A proper message should be shown on the UI that is being returned from the API

sadiq1971 avatar Feb 06 '23 14:02 sadiq1971

Apparently this is only happening on prod, I checked on stage and is working as expected.

STAGE: Screenshot 2023-02-08 at 16 30 18 Screenshot 2023-02-08 at 16 30 37

PROD Screenshot 2023-02-08 at 16 30 57 Screenshot 2023-02-08 at 16 31 21

CC @asnaith @sadiq1971

juans-chainsafe avatar Feb 06 '23 16:02 juans-chainsafe

@juans-chainsafe Oh I see what you mean but in your example, you were checking the network response on stage when the status was still "queued", repro steps state it needs to first show "pinned".

However, the actual issue here is that the error needs to be displayed in the Storage UI so that the user can see it (not just in the console).

asnaith avatar Feb 08 '23 23:02 asnaith

@juans-chainsafe Oh I see what you mean but in your example, you were checking the network response on stage when the status was still "queued", repro steps state it needs to first show "pinned".

However, the actual issue here is that the error needs to be displayed in the Storage UI so that the user can see it (not just in the console).

If you look closely, there are 2 images for stage and 2 for prod, the first image of each env is with the initial status (pinned) and the second image shows the status after you click "unpin", so stage shows queued (and after a minute or so, is deleted from the table) and prod shows that is still in pinned because of the error.

But you are right that the ticket is only to show the error to the user.

juans-chainsafe avatar Feb 09 '23 12:02 juans-chainsafe