Skip to content

Commit

Permalink
handleslack: handle new RTM error event
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 24, 2024
1 parent 52cdb0d commit d112c79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ require (
maunium.net/go/mauflag v1.0.0 // indirect
)

replace github.com/slack-go/slack => github.com/beeper/slackgo v0.0.0-20240913184704-a53c45716dc4
replace github.com/slack-go/slack => github.com/beeper/slackgo v0.0.0-20240924110412-281dc21eaf99
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
github.com/beeper/slackgo v0.0.0-20240913184704-a53c45716dc4 h1:aKVaX7yZy8bmWyMHZsX6u44Ipti3YlmOjtqRwkxigKQ=
github.com/beeper/slackgo v0.0.0-20240913184704-a53c45716dc4/go.mod h1:K+6JA6FP9/mILahVr6VH67l83p0sWkayPiDOBhzKWlo=
github.com/beeper/slackgo v0.0.0-20240924110412-281dc21eaf99 h1:osNCstJaXL/hbsHFHnoM5vKpnMkA6aQwxaXhQE764y8=
github.com/beeper/slackgo v0.0.0-20240924110412-281dc21eaf99/go.mod h1:K+6JA6FP9/mILahVr6VH67l83p0sWkayPiDOBhzKWlo=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
5 changes: 5 additions & 0 deletions pkg/connector/handleslack.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ func (s *SlackClient) HandleSlackEvent(rawEvt any) {
logEvt = logEvt.RawJSON("raw_data", evt.Raw)
}
logEvt.Msg("Unmarshalling error")
case *slack.RTMErrorEvent:
log.Error().
Str(zerolog.ErrorFieldName, evt.Error.Msg).
Int("error_code", evt.Error.Code).
Msg("Got RTM error")
case *slack.HelloEvent:
log.Debug().Msg("Received hello event from websocket (now really connected)")
s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateConnected})
Expand Down

0 comments on commit d112c79

Please sign in to comment.