Skip to content

fix: handling of empty discord client event messages#3264

Merged
Ziinc merged 3 commits intomainfrom
fix/discord-client-empty-event-message
Apr 10, 2026
Merged

fix: handling of empty discord client event messages#3264
Ziinc merged 3 commits intomainfrom
fix/discord-client-empty-event-message

Conversation

@Ziinc
Copy link
Copy Markdown
Contributor

@Ziinc Ziinc commented Mar 10, 2026

GenServer {Logflare.Backends.SourceRegistry, {xxxx, Logflare.Sources.Source.WebhookNotificationServer}} terminating ** (FunctionClauseError) no function clause matching in String.split_at/2 
(elixir 1.19.5) lib/string.ex:700: String.split_at(nil, 1018) 
(logflare 1.34.13) lib/logflare/sources/source/webhook_notification_server/discord_client.ex:102: Logflare.Sources.Source.WebhookNotificationServer.DiscordClient.discord_event_message/1 
(elixir 1.19.5) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 
(logflare 1.34.13) lib/logflare/sources/source/webhook_notification_server/discord_client.ex:31: Logflare.Sources.Source.WebhookNotificationServer.DiscordClient.post/4 
(logflare 1.34.13) lib/logflare/sources/source/webhook_notification_server/webhook_notification_server.ex:50: Logflare.Sources.Source.WebhookNotificationServer.handle_info/2 
(stdlib 6.2.2.2) gen_server.erl:2345: :gen_server.try_handle_info/3 
(stdlib 6.2.2.2) gen_server.erl:2433: :gen_server.handle_msg/6 
(stdlib 6.2.2.2) proc_lib.erl:340: :proc_lib.wake_up/3 Last message: :check_rate

@Ziinc Ziinc requested a review from amokan March 10, 2026 08:32
Copy link
Copy Markdown
Contributor

@amokan amokan 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 and so sorry for the delay on this @Ziinc

Minor comment below about a guard we have for the binary not empty string check.

Comment thread lib/logflare/sources/source/webhook_notification_server/discord_client.ex Outdated
@Ziinc Ziinc force-pushed the fix/discord-client-empty-event-message branch from f507337 to 6c271da Compare April 10, 2026 12:39
@Ziinc Ziinc merged commit c57d98f into main Apr 10, 2026
12 checks passed
@Ziinc Ziinc deleted the fix/discord-client-empty-event-message branch April 10, 2026 14:47
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.

2 participants