-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Incoherent error message with the file API specs #1256
Comments
Hey there @fsdiogo! Thanks for raising this issue. It just so happens that a couple hours ago another user @tiagochen submitted a pull request (#1255) that addresses this, albeit in a slightly different manner. Strange! May I ask what brought you to the project? He suggests another approach to fix this problem which is to just pass a I bet that error was confusing, though. We'd love a PR for that! |
Hey @JonKrone! Oh cool, I didn't check the open PRs, that would have saved me some time debugging! 😛 I've heard about IPFS and saw some of the talks Juan Benet gave, thought that this was a really smart and ambitious project, so I decided to get my hands dirty! I thought of wrapping the object inside an array just to keep the example almost the same, but maybe passing a buffer is simpler 👍 Yup, it was confusing enough, but that's what made me dig a little deeper. That being said, I can make a PR to change the error, I'll leave the example out as it's already being fixed 🙂 Sounds good? |
@diasdavid cool, that solves it then 😄 |
Version with the fix published :)
Thank you and Welcome to IPFS community :) |
Hey guys, I stumbled upon an error when trying the ipfs-101 example.
Type: Bug
Severity: Low
Description:
I was following the tutorial along and got to the adding a file to IPFS part:
After running the script nothing was being logged because an error occurred. When logging the error I got the following output:
The files API specs states:
So the error message isn't coherent with the files API.
To check which was wrong I looked at the files.js source code and found:
So the error message is wrong, it should be:
Also, in the example it's missing the array, it's just an object, that's why it doesn't work. Putting the object inside an array works as expected 👍
I can open a PR with the fixes if you want!
The text was updated successfully, but these errors were encountered: