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

Handle token_revoked event #892

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

insomniacslk
Copy link
Contributor

This is a critical event and the client should stop trying to reconnect.

Signed-off-by: Andrea Barberio insomniac@slackware.it

@@ -162,6 +162,7 @@ func (smc *Client) connect(ctx context.Context, connectionCount int, additionalP
errInvalidAuth = "invalid_auth"
errInactiveAccount = "account_inactive"
errMissingAuthToken = "not_authed"
errInvalidToken = "invalid_token"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalid_token? token_revoked? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Slack send us to different errors for SocketMode and RTM??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apologies, I messed up, it's the same error string. Fixing it

@kanata2 kanata2 added the feedback given When a review has been conducted and awaiting the response from the comitter(s) label Feb 15, 2021
This is a critical event and the client should stop trying to reconnect.

Signed-off-by: Andrea Barberio <insomniac@slackware.it>
@insomniacslk
Copy link
Contributor Author

insomniacslk commented Feb 17, 2021

Not sure why this is failing only on go 1.12, @kanata2 would you have an insight?

--- FAIL: TestRTMGoodbye (0.02s)
    websocket_managed_conn_test.go:106: 
        	Error Trace:	websocket_managed_conn_test.go:106
        	Error:      	Not equal: 
        	            	expected: false
        	            	actual  : true
        	Test:       	TestRTMGoodbye

@kanata2 kanata2 removed the feedback given When a review has been conducted and awaiting the response from the comitter(s) label Mar 7, 2021
@kanata2
Copy link
Member

kanata2 commented Mar 16, 2021

This test is so fragile... (I'll run test again.)

Copy link
Member

@kanata2 kanata2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@kanata2 kanata2 merged commit 5822d67 into slack-go:master Mar 16, 2021
@insomniacslk insomniacslk deleted the handle_token_revoked branch March 16, 2021 19:29
insomniacslk added a commit to insomniacslk/irc-slack that referenced this pull request Mar 16, 2021
In particular, improve reconnection behaviour after merging slack-go/slack#892

Signed-off-by: Andrea Barberio <insomniac@slackware.it>
insomniacslk added a commit to insomniacslk/irc-slack that referenced this pull request Mar 16, 2021
In particular, improve reconnection behaviour after merging slack-go/slack#892

Signed-off-by: Andrea Barberio <insomniac@slackware.it>
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