Print actual tx error instead of guessing

This commit is contained in:
Basti 2019-04-05 20:07:30 +02:00
parent f39bd41098
commit 16b62a2545
No known key found for this signature in database
GPG Key ID: BE4634D632D39B67

View File

@ -47,7 +47,8 @@ module.exports = async function(robot, kredits) {
return Contribution.addContribution(contributionAttr).catch(error => {
robot.logger.error(`[hubot-kredits] Error:`, error);
messageRoom(`I wanted to propose giving kredits to GitHub user ${githubUser} for ${url}, but I cannot find their info. Please add them as a contributor: https://kredits.kosmos.org`);
messageRoom(`I tried to add a contribution for ${githubUser} for ${url}, but I encountered an error when submitting the tx:`);
messageRoom(error.message);
});
});
}