fission-codes / webnative-elm

Thin wrapper around webnative for Elm.
https://package.elm-lang.org/packages/fission-suite/webnative-elm/latest/
Apache License 2.0
13 stars 2 forks source link

Wnfs.publish returns empty error message #5

Closed icidasset closed 3 years ago

icidasset commented 3 years ago
Err (Just Wnfs, "")

Not entirely sure this comes from publish.

matheus23 commented 3 years ago

Noticed this, too. I think it's because of this line https://github.com/fission-suite/webnative-elm/blob/7ae3bfb89f509ce5d9e47b5c0afab855408ee68c/src/Wnfs.elm#L126

matheus23 commented 3 years ago

So usually you'd provide a tag yourself for other WNFS functions like ls, rm, etc. But publish just sets the tag to an empty string, so if your tag parser doesn't expect that, it'll error.

icidasset commented 3 years ago

So usually you'd provide a tag yourself for other WNFS functions like ls, rm, etc. But publish just sets the tag to an empty string, so if your tag parser doesn't expect that, it'll error.

Oohhh, good catch, thanks! 👏

icidasset commented 3 years ago

Fixed in v3, also added an Error type so we can tell where the error message is exactly coming from.