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

Fix not handling conversion #16

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Conversation

happilymarrieddad
Copy link

This is the error I'm encountering

2023/09/21 15:37:13 {"rid":2}
2023/09/21 15:37:21
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 22 [running]:
github.com/sacOO7/socketcluster-client-go/scclient/parser.GetMessageDetails({0x0?, 0x0?})
	/Users/nkotenberg/go/pkg/mod/github.com/sac!o!o7/socketcluster-client-go@v1.0.0/scclient/parser/parser.go:28 +0x236
github.com/sacOO7/socketcluster-client-go/scclient.(*Client).Connect.(*Client).registerCallbacks.func3({0x0, 0x0}, {0xc0003886e0, 0xc000482000, {0x1422697, 0x22}, {0x0, 0x1, 0x0, {0x0, ...}}, ...})
	/Users/nkotenberg/go/pkg/mod/github.com/sac!o!o7/socketcluster-client-go@v1.0.0/scclient/client.go:65 +0xe7
github.com/sacOO7/gowebsocket.(*Socket).Connect.func4()
	/Users/nkotenberg/go/pkg/mod/github.com/sac!o!o7/gowebsocket@v0.0.0-20221109081133-70ac927be105/gowebsocket.go:156 +0x2f8
created by github.com/sacOO7/gowebsocket.(*Socket).Connect in goroutine 19
	/Users/nkotenberg/go/pkg/mod/github.com/sac!o!o7/gowebsocket@v0.0.0-20221109081133-70ac927be105/gowebsocket.go:135 +0x799
exit status 2
☁  api

So dep isn't available anymore and has been deprecated since 2020 which makes testing very hard. I've updated to go mod. This PR also fixes the above error. Conversions should handle the possible failure case and now it does. Hopefully that makes sense. I need this for a work project so I hoping we can get this worked out. Thanks!

@sacOO7
Copy link
Owner

sacOO7 commented Sep 22, 2023

Thanks for the PR 👍

@sacOO7 sacOO7 merged commit e06423a into sacOO7:master Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants