How to get the Stack Trace when executing using the Coda CLI

Just moved onto the Coda CLI but can’t figure out how to see the stack trace when there’s a runtime error.

So when running npx coda execute ... i’ll get a the error like Cannot read properties of null (reading 'login') but no line number.

How do you display the stack trace?

Hi @Ryan_Hubbard1 - Thanks for raising this issue. It looks like we changed our code a while back in a way that swallows the stack trace, which I don’t think was intentional. Let me raise this with the team and see if we can get a fix out.

As a workaround you can use a common error handler function to catch the errors and print the stack trace.

@Ryan_Hubbard1 - I wanted to let you know that i just committed a change to the CLI that should fix the issue with missing stack traces. We haven’t made a new release of the CLI yet, but you if you want to start using it now you can install it from the GitHub repo:

npm i https://github.com/coda/packs-sdk.git
1 Like

Thanks @Eric_Koleda!