This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Fail non-silently when things are unimplemented #1633
Closed
Description
-
Version:
commit: ""
repo: 7
version: "0.32.3" -
Platform:
uname -srvpoi
> Linux 4.15.0-33-generic IPFS Repo JavaScript Implementation #36~16.04.1-Ubuntu SMP Wed Aug 15 17:21:05 UTC 2018 x86_64 x86_64 GNU/Linux- Chrome Version 69.0.3497.92 (Official Build) (64-bit)
- Subsystem: files (?)
Type: Enhancement
Severity: Medium
Description:
files.add(blob, { chunker: 'rabin' })
fails silently by returning an empty array when running in browser. It would be immensely helpful for me if these kinds of silent failures were non-silent. As it is, I wasted 1 hour figuring out why this call was failing. If you throw "unimplemented errors" in a uniform way, it could also help newcomers find areas where they can help.
The reason this is important to me is that I'm using IPFS to store some game state, and the game server can run either in-browser or on Node - using the same code.
Steps to reproduce the error:
- Add some data with
files.add
using the rabin chunker. - Observe that the callback receives an empty array in response.