Skip to content

Remove unused Patreon webhook included resources parsing#84

Merged
raimannma merged 2 commits intomasterfrom
claude/fix-patreon-webhook-WdzCi
Feb 6, 2026
Merged

Remove unused Patreon webhook included resources parsing#84
raimannma merged 2 commits intomasterfrom
claude/fix-patreon-webhook-WdzCi

Conversation

@raimannma
Copy link
Member

Description

Removes unused code from the Patreon webhook types module. The included field in WebhookPayload and all related resource types (WebhookIncludedResource, WebhookIncludedUser, WebhookIncludedTier, WebhookIncludedCampaign) are no longer needed and have been removed. Also removes the #![allow(dead_code)] attribute that is no longer necessary.

Type of Change

  • Code refactoring (no functional changes)

How Has This Been Tested?

  • Unit tests (existing tests should continue to pass)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Additional Notes

This is a cleanup change that removes dead code that was not being utilized by the webhook processing logic. The primary data field in WebhookPayload contains all the necessary information for handling Patreon webhook events.

https://claude.ai/code/session_01B9n2M34zDHnx5NiAKS6R97

…serialization failures

The `included` field in WebhookPayload was never accessed but was still
deserialized. It used an internally-tagged serde enum (WebhookIncludedResource)
with `#[serde(tag = "type")]` that could fail to deserialize if Patreon sent
unexpected resource types or formats in the included array. This caused the
entire webhook payload deserialization to fail with a 400 response, leading
Patreon to disable the webhook after repeated failures.

Since serde ignores unknown fields by default, removing the `included` field
means the JSON key is simply skipped during deserialization.

https://claude.ai/code/session_01B9n2M34zDHnx5NiAKS6R97
Rename md-5 to md5 via Cargo package alias so cargo-machete can trace
the dependency. Remove unused fields (WebhookMemberData::id,
WebhookResourceRef::resource_type) that exist in the JSON but are never
read — serde silently ignores them during deserialization.

https://claude.ai/code/session_01B9n2M34zDHnx5NiAKS6R97
@raimannma raimannma force-pushed the claude/fix-patreon-webhook-WdzCi branch from a9b8d0f to 58b6dfb Compare February 6, 2026 06:39
@raimannma raimannma merged commit 88f4f5d into master Feb 6, 2026
11 of 12 checks passed
@raimannma raimannma deleted the claude/fix-patreon-webhook-WdzCi branch February 6, 2026 06:44
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