Skip to content

Conversation

@capcom6
Copy link
Member

@capcom6 capcom6 commented Oct 21, 2025

Summary by CodeRabbit

  • Documentation
    • Added troubleshooting guidance for duplicate messages in webhook payloads. Explains how redirect behavior can trigger message retries and provides two remediation options: adjusting retry settings or implementing deduplication logic using payload identifiers.

@capcom6 capcom6 linked an issue Oct 21, 2025 that may be closed by this pull request
@coderabbitai
Copy link

coderabbitai bot commented Oct 21, 2025

Walkthrough

Updated the README troubleshooting section to document duplicate message occurrences caused by Google Apps Script 302 redirects for POST requests, explaining SMSGate's retry mechanism and providing two remediation approaches: adjusting retry count settings or implementing messageId-based deduplication in Apps Script.

Changes

Cohort / File(s) Summary
Documentation troubleshooting update
README.md
Added troubleshooting bullet explaining duplicate messages from 302 redirects and SMSGate retries, with two remediation options: reduce retry count or implement deduplication using messageId in Apps Script.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • [init] first implementation #1: Contains the example Google Apps Script webhook handler (doPost) that exposes messageId, directly supporting the deduplication approach documented in this troubleshooting addition.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "[docs] troubleshooting duplicate messages" is fully related to the main change in the changeset. The [docs] prefix clearly indicates this is a documentation update, and "troubleshooting duplicate messages" precisely describes the content added to the README.md file. The title is specific, concise, and clearly communicates that the changeset adds documentation about troubleshooting duplicate message issues. It avoids vague terminology and provides meaningful context about the primary change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/troubleshoot-duplicate-messages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
README.md (1)

139-141: Fix nested list indentation to comply with markdown linting rules.

The troubleshooting content is well-written and addresses a legitimate technical issue. However, the nested sub-items (Option 1 and Option 2) use 4-space indentation, but markdown linting rules (MD007) expect 2-space indentation for nested lists. This will likely cause CI/CD failures if linting is enforced.

Apply this diff to correct the indentation:

- **Duplicate messages in sheet**: If you notice the same SMS message being logged multiple times, this occurs because Google Apps Script returns a 302 redirect for POST requests. SMSGate retries webhook delivery on non-2xx responses. To fix:
-    - Option 1: Set "Retry count" to 1 in SMSGate settings ([Settings → Webhooks → Retry count](https://docs.sms-gate.app/features/webhooks/#step-5-receive-the-payload))
-    - Option 2: Implement deduplication in your Apps Script using the unique `messageId` from the webhook payload
+- **Duplicate messages in sheet**: If you notice the same SMS message being logged multiple times, this occurs because Google Apps Script returns a 302 redirect for POST requests. SMSGate retries webhook delivery on non-2xx responses. To fix:
+  - Option 1: Set "Retry count" to 1 in SMSGate settings ([Settings → Webhooks → Retry count](https://docs.sms-gate.app/features/webhooks/#step-5-receive-the-payload))
+  - Option 2: Implement deduplication in your Apps Script using the unique `messageId` from the webhook payload
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 114f8a4 and e7dd718.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

140-140: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


141-141: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

@capcom6 capcom6 merged commit 130cd96 into master Oct 21, 2025
1 check passed
@capcom6 capcom6 deleted the docs/troubleshoot-duplicate-messages branch October 21, 2025 13:51
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.

One msg get 20/50 time

1 participant