improve error logging for JS/TS ping test#119
improve error logging for JS/TS ping test#119GlenDC wants to merge 1 commit intolibp2p:marco/update-tests-to-specfrom
Conversation
helps debugging issues in case things go haywire while testing the JS implementation
|
Thanks. What errors did you run into that this logged? If you have time, could you rebase to #121. If not, no worries. I can take :) |
Rebased it. Two issues:
|
| console.error(`unexpected exception in ping test: ${err}\n Errors: ${err.errors}`) | ||
| } else { | ||
| console.error(`unexpected exception in ping test: ${err}`) | ||
| } |
There was a problem hiding this comment.
I am no JS expert but I think if you pass the err as an argument to console.error, it will display a nice stacktrace.
| console.error(`unexpected exception in ping test: ${err}\n Errors: ${err.errors}`) | |
| } else { | |
| console.error(`unexpected exception in ping test: ${err}`) | |
| } | |
| console.error(`unexpected exception in ping test: ${err}\n Errors: ${err.errors}`) | |
| } else { | |
| console.error(`unexpected exception in ping test`, err) | |
| } |
There was a problem hiding this comment.
Could be. Feel free to take over this PR by the way @MarcoPolo. You probably know better what you want to do with this suggestion and PR. My intention was more to share the need for better error logging in case the happy path is not being followed.
2516f30 to
98161af
Compare
|
@GlenDC this PR has merge conflicts |
|
I'm taking this pr. |
|
Added logs to #121 |
helps debugging issues in case
things go haywire while testing the JS implementation