Improve error handling for list-contributors script
This commit is contained in:
parent
359989f235
commit
6b2ac15f56
@ -21,10 +21,6 @@ module.exports = async function(callback) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const contributors = await kredits.Contributor.all()
|
const contributors = await kredits.Contributor.all()
|
||||||
} catch(e) {
|
|
||||||
callback(e);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
contributors.forEach((c) => {
|
contributors.forEach((c) => {
|
||||||
table.push([
|
table.push([
|
||||||
@ -38,6 +34,10 @@ module.exports = async function(callback) {
|
|||||||
c.ipfsHash
|
c.ipfsHash
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
|
} catch(e) {
|
||||||
|
callback(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
console.log(table.toString())
|
console.log(table.toString())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user