Skip to content

fix: survive a malformed upstream response and an empty chat list - #101

Merged
rmyndharis merged 1 commit into
mainfrom
fix/remaining-plugin-behaviours
Aug 12, 2026
Merged

fix: survive a malformed upstream response and an empty chat list#101
rmyndharis merged 1 commit into
mainfrom
fix/remaining-plugin-behaviours

Conversation

@rmyndharis

Copy link
Copy Markdown
Owner

typebot-connector checked messages and clientSideActions for null but not for shape. A Typebot server returning either as an object or a string raised a TypeError inside the message hook instead of degrading to no bubbles. Both are array-checked now — the upstream is third-party, and its response is untrusted input like any other.

chatwoot-adapter marked its one-time bulk backfill complete even when the engine returned no chats. The engine returns an empty list while it is still warming up, and the completion marker is durable — so a sweep that ran at the wrong moment retired bulk backfill for that session permanently, with no way to retry short of clearing storage. It now leaves the marker unset and logs the skip, so a later enable tries again.

Verification

  • 586 tests pass, typecheck clean, catalog up to date.

typebot-connector checked `messages` and `clientSideActions` for null but not for shape. A Typebot
server returning either as an object or a string raised a TypeError inside the message hook rather than
degrading to no bubbles. Both are array-checked now — the upstream is third-party, and its response is
untrusted input like any other.

chatwoot-adapter marked its one-time bulk backfill complete even when the engine returned no chats. The
engine returns an empty list while it is still warming up, and the marker is durable, so a sweep at the
wrong moment retired bulk backfill for that session permanently. It now leaves the marker unset and
logs, so a later enable tries again.
@rmyndharis
rmyndharis merged commit 25004db into main Aug 12, 2026
1 check passed
@rmyndharis
rmyndharis deleted the fix/remaining-plugin-behaviours branch August 12, 2026 11:12
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.

1 participant