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
When adding content to Helia and setting the 'pin' option to true, if a pin exists the add method will throw a generic error with the message 'Already Pinned'.
If the content already exists and/or is already pinned, is this really an error? The goal of the client is to have the content pinned, if it is already pinned, the client desire is satisfied already, not unsatisfiable.
If an error must be thrown, providing a specific error type or enumeration that could be reliably checked against would be helpful. Checking against an arbitrary message string seems fragile.
The text was updated successfully, but these errors were encountered:
When adding content to Helia and setting the 'pin' option to true, if a pin exists the add method will throw a generic error with the message 'Already Pinned'.
The throw is here:
https://github.com/ipfs/helia/blob/main/packages/utils/src/pins.ts#L75
A couple of thoughts:
The text was updated successfully, but these errors were encountered: