Repository navigation
fix(zalo): log and drop messages with no content instead of throwing - #1646
Merged
Merged
Conversation
Zalo sends some events (e.g. oa_send_template) with no text or attachment. Throwing failed the incomingMessage job for a non-code issue; log one warning line and skip the message instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sung17
added a commit
that referenced
this pull request
Nov 10, 2026
…of failing (#1684) A channel parser returns null for a webhook event with nothing to store (e.g. a Zalo oa_send_template with no text or attachment, since #1646). receiveMessage then threw "Unable to parse received message", so the incomingMessage job still failed and retried for a non-code issue. Log a warning with the integration type and inbox, and return null; both callers already treat null as "nothing to do". Co-authored-by: Deathgiver <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
hello-jackytruong
referenced
this pull request
in hello-jackytruong/ChatWorkAI
Nov 22, 2026
…(#1646) Zalo sends some events (e.g. oa_send_template) with no text or attachment. Throwing failed the incomingMessage job for a non-code issue; log one warning line and skip the message instead. Co-authored-by: Deathgiver <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
hello-jackytruong
referenced
this pull request
in hello-jackytruong/ChatWorkAI
Nov 22, 2026
…of failing (#1684) A channel parser returns null for a webhook event with nothing to store (e.g. a Zalo oa_send_template with no text or attachment, since #1646). receiveMessage then threw "Unable to parse received message", so the incomingMessage job still failed and retried for a non-code issue. Log a warning with the integration type and inbox, and return null; both callers already treat null as "nothing to do". Co-authored-by: Deathgiver <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Zalo sends some events (e.g.
oa_send_template) with no text and no attachment.getMessageEntitythrewZaloException: No content found in message …, failing theincomingMessagejob and adding noise to error tracking for something that is not a code bug.Now it logs one warning line (
Zalo message has no content: <event_name>) and returnsnull, whichreceiveMessagealready uses to skip invalid messages (same as missing sender/recipient).Missing msg_idstill throws, since that is malformed data.Changes
integrations/zalo/src/handlers/message/incoming-message/index.ts:getMessageEntityreturnsnull+logger.warninstead of throwing;receiveMessagereturnsnullin that case.integrations/zalo/__tests__/incoming-gif-message.test.ts: the GIF-download-failed case now expectsnullinstead of a throw.Test plan
tsc --noEmitinintegrations/zalovitest runinintegrations/zalo: 16 files, 74 tests passed🤖 Generated with Claude Code