Repository navigation
fix(socket-mode): handle events_api payloads without an inner event - #2787
levenleven wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 0b075d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
7e2d80c to
d6cd625
Compare
d6cd625 to
38a11ed
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2787 +/- ##
==========================================
+ Coverage 89.34% 89.41% +0.06%
==========================================
Files 65 65
Lines 10548 10560 +12
Branches 480 483 +3
==========================================
+ Hits 9424 9442 +18
+ Misses 1092 1086 -6
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Thanks so much for tracking this down and putting together a fix — this crash has been open for a while and it's great to finally have a proper solution for it! A couple of small things worth addressing before we merge: Test consistency ( Silent drop in the else branch ( Neither of these is a blocker — the core fix is solid — but they're worth a quick pass before merge. |
Slack sends app_rate_limited notifications as events_api envelopes with no inner event, which crashed the message handler. Emit the payload type instead so apps can listen for it.
38a11ed to
0b075d5
Compare
|
Thanks for quick review @hello-ashleyintech. I've applied both suggestions. |
Summary
Slack sends
app_rate_limitednotifications asevents_apienvelopes with no innerevent, which crashed the Socket Mode client withCannot read properties of undefined (reading 'type'). The client now emits the payload type (e.g.app_rate_limited) for these messages.slack_eventlisteners still receive the message.Fixes #2167
Fixes #2753
Requirements