Skip to content

fix(whatsapp): log the credit line error under err so the stack survives - #1470

Merged
sung17 merged 1 commit into
mainfrom
fix/whatsapp-credit-line-log-err
Oct 12, 2026
Merged

sung17 merged 1 commit into
mainfrom
fix/whatsapp-credit-line-log-err

Conversation

@sung17

@sung17 sung17 commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

shareCreditLine logged its caught error as { error }. Pino's serializer is keyed on err, so the stack trace was dropped (AGENTS.md invariant 20). It now logs { err: error }.

 } catch (error) {
-  logger.info({ error }, "Failed to share credit line")
+  logger.info({ err: error }, "Failed to share credit line")
 }

Found by the new check:invariants script in the companion agent-guidance PR. That PR's lint gate fails until this fix lands.

Merge Danger

Door: two-way. This is a one-line logging change.
Blast Radius: log output only.

Test plan

  • pnpm lint
  • check-types for @chatbotx.io/integration-whatsapp

🤖 Generated with Claude Code

Pino's serializer is keyed on `err`; logging `{ error }` dropped the stack
trace (AGENTS.md invariant 20).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working as expected label Oct 12, 2026
@sung17
sung17 merged commit 9b14a78 into main Oct 12, 2026
5 checks passed
khan-umirzakoff added a commit to khan-umirzakoff/ChatbotX-Fork-ChatPlus that referenced this pull request Oct 12, 2026
Brings two upstream fixes: mini-apps delete dialog width (ChatbotXIO#1472) and
WhatsApp credit line error logging (ChatbotXIO#1470). No migrations.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
…ves (#1470)

Pino's serializer is keyed on `err`; logging `{ error }` dropped the stack
trace (AGENTS.md invariant 20).

Co-authored-by: Deathgiver <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant