Add more logs for IPFS failures
All checks were successful
Release Drafter / Update release notes draft (pull_request) Successful in 4s
All checks were successful
Release Drafter / Update release notes draft (pull_request) Successful in 4s
This commit is contained in:
parent
f4634fe692
commit
6e9f565587
@ -52,6 +52,7 @@ class Contributor extends Record {
|
|||||||
|
|
||||||
const jsonStr = contributor.serialize();
|
const jsonStr = contributor.serialize();
|
||||||
|
|
||||||
|
// console.log('Adding IPFS doc for', contributorAttr.account);
|
||||||
return this.ipfs
|
return this.ipfs
|
||||||
.add(jsonStr)
|
.add(jsonStr)
|
||||||
.then((ipfsHashAttr) => {
|
.then((ipfsHashAttr) => {
|
||||||
@ -62,7 +63,11 @@ class Contributor extends Record {
|
|||||||
ipfsHashAttr.hashSize,
|
ipfsHashAttr.hashSize,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// console.log('Adding onchain record for', contributorAttr.account);
|
||||||
return this.contract.addContributor(...contributor, callOptions);
|
return this.contract.addContributor(...contributor, callOptions);
|
||||||
|
}).catch(err => {
|
||||||
|
console.log('Failed to add IPFS document:', err.message);
|
||||||
|
throw(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,13 @@ class IPFS {
|
|||||||
}
|
}
|
||||||
this._config = config;
|
this._config = config;
|
||||||
this._ipfsAPI = ipfsClient.create(config);
|
this._ipfsAPI = ipfsClient.create(config);
|
||||||
|
|
||||||
|
this._ipfsAPI.id().then(res => {
|
||||||
|
console.debug('IPFS ID:', res.id);
|
||||||
|
}).catch(e => {
|
||||||
|
console.debug('IPFS config:', config);
|
||||||
|
console.warn('Failed to initialize IPFS:', e.message);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async catAndMerge (contractData, deserialize) {
|
async catAndMerge (contractData, deserialize) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user