Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

On Server SDK show error details #91

Open
worldsibu-bot opened this issue Jul 24, 2019 · 0 comments
Open

On Server SDK show error details #91

worldsibu-bot opened this issue Jul 24, 2019 · 0 comments

Comments

@worldsibu-bot
Copy link
Contributor

The problem

When sending a transaction that should fail, the nodejs SDK won't show all the levels of the error.

Environment

  • Convector version (or git revision) that exhibits the issue: 1.3.0
  • Last Convector version that did not exhibit the issue (if applicable):
  • OS/version: Mac
  • Node.js version: 8.11
  • Npm or Yarn package manager: NPM
  • Convector CLI version (if applicable):
  • Hurley CLI version (if applicable):

Details

Show more details of the error by printing the whole response object.

Current Behavior

It won't show the exact error of the responses.

Expected Behavior

Should show the details of the errors from every peer.

Code To Reproduce Issue [ Good To Have ]

Send a transaction from nodejs to a function inside of the chaincode that breaks by design such as:

throw new Error('expected')

Fix

Add this to the place where the error is printed (import util first)

console.log(util.inspect(ex, {showHidden: false, depth: null}))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant