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

Add a clear error message indicating RPC endpoint fails to connect #10

Open
chrisli30 opened this issue Jul 18, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@chrisli30
Copy link
Member

If we know RPC connection fails, our program should throw an error in log trace clearly indicating that.

Right now the error looks like this

{"level":"info","ts":1721310748.5356233,"caller":"operator/operator.go:148","msg":"ap-avs operator version v1.1.2"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xd8 pc=0xbfde71]

goroutine 1 [running]:
github.com/AvaProtocol/ap-avs/operator.(*Operator).RegisterOperatorWithAvs(0x0)
        /app/operator/registration.go:54 +0x71
github.com/AvaProtocol/ap-avs/operator.RegisterToAVS({0x7ffdb69c6df1?, 0x0?})
        /app/operator/registration.go:23 +0x65
github.com/AvaProtocol/ap-avs/cmd.init.func4(0xc00012ea00?, {0xfddeff?, 0x4?, 0xfddf03?})
        /app/cmd/register.go:16 +0x25
github.com/spf13/cobra.(*Command).execute(0x19c53e0, {0xc000132e00, 0x1, 0x1})
        /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x19c59a0)
        /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/AvaProtocol/ap-avs/cmd.Execute()
        /app/cmd/root.go:24 +0x1a
main.main()
        /app/main.go:9 +0xf
@chrisli30 chrisli30 added the enhancement New feature or request label Jul 18, 2024
@v9n v9n self-assigned this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants