Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing error handling on json directory upload #18

Open
nagydani opened this issue Jan 11, 2018 · 0 comments
Open

Missing error handling on json directory upload #18

nagydani opened this issue Jan 11, 2018 · 0 comments

Comments

@nagydani
Copy link
Collaborator

The function body at
https://github.com/ethereum/swarm-dapps/blob/master/examples/album/file-manager.js#L104
does not handle errors and assigns i with the http response even if the status is different from 200 and the response is not a hash. A sanity check similar to
https://github.com/ethereum/swarm-dapps/blob/master/examples/album/file-manager.js#L22
would probably do the trick. In fact, it would be nice to have a common code for PUT-ting a file and then receiving and checking a hash.

@nagydani nagydani assigned nagydani and unassigned nagydani Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant