When I try to fetch a non existing hash
, the sdk hangs.
Here’s what my code looks like:
const ipfsAPI = require('ipfs-api');
const api = ipfsAPI('/ip4/127.0.0.1/tcp/5001');
When I try to fetch a valid address using the below code works fine:
api.ls('QmQLXHs7K98JNQdWrBB2cQLJahPhmupbDjRuH1b9ibmwVa')
.then(response => console.log('File retrieved:', response))
.catch(error => console.log('Error while retrieveing file:', error));
But when I try to fetch a non existing address, It hangs and doesn’t stop.
sdk.sdk.files.get('QmQLXHs7K98JNQdWrBB2cQLJahPhmupbDjRuH1b9ibmwVV')
.then(response => console.log(response))
.catch(err => console.log(err));