Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need better error message than stacktrace dump #138

Open
chenrui333 opened this issue Nov 23, 2022 · 1 comment
Open

Need better error message than stacktrace dump #138

chenrui333 opened this issue Nov 23, 2022 · 1 comment
Labels
will be tackled It's in our radar to tackle in a future release

Comments

@chenrui333
Copy link

Problem

When trying to run tx pull with misconfigured .tx/config, I saw some stacktrace dump as below

# Getting info about resources

panic: runtime error: integer divide by zero

goroutine 1 [running]:
github.com/transifex/cli/pkg/worker_pool.makeProgressBar(0x0, 0x0, 0x140001128a0, 0x140001faa00)
	/home/runner/work/cli/cli/pkg/worker_pool/main.go:249 +0x18c
github.com/transifex/cli/pkg/worker_pool.(*Pool).Start(0x140001faa00)
	/home/runner/work/cli/cli/pkg/worker_pool/main.go:228 +0x2d8
github.com/transifex/cli/internal/txlib.PullCommand(0x140001fe450, 0x1400013c5a0, 0x14000206280, 0x0, 0x0)
	/home/runner/work/cli/cli/internal/txlib/pull.go:63 +0x320
github.com/transifex/cli/cmd/tx.Main.func5(0x140001fa900, 0x13, 0x24)
	/home/runner/work/cli/cli/cmd/tx/main.go:592 +0xa04
github.com/urfave/cli/v2.(*Command).Run(0x140001f6000, 0x140001fa140, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:163 +0x3c8
github.com/urfave/cli/v2.(*App).RunContext(0x14000123d40, 0x1053318a0, 0x14000136008, 0x14000110050, 0x5, 0x5, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:313 +0x5ec
github.com/urfave/cli/v2.(*App).Run(...)
	/home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:224
github.com/transifex/cli/cmd/tx.Main()
	/home/runner/work/cli/cli/cmd/tx/main.go:1029 +0x266c
main.main()
	/home/runner/work/cli/cli/main.go:5 +0x20

I would be better to display more user-friendly error messages rather than the stacktrace dump.

@codegaze codegaze added the will be tackled It's in our radar to tackle in a future release label Nov 25, 2022
@codegaze
Copy link
Member

Hello @chenrui333, thanks for bringing this to our attention.
Could you please provide a txconfig example that can reproduce this behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
will be tackled It's in our radar to tackle in a future release
Projects
None yet
Development

No branches or pull requests

3 participants
@chenrui333 @codegaze and others