Remove unused Patreon webhook included resources parsing#84
Merged
Remove unused Patreon webhook included resources parsing#84
Conversation
…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
a9b8d0f to
58b6dfb
Compare
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.
Description
Removes unused code from the Patreon webhook types module. The
includedfield inWebhookPayloadand 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
How Has This Been Tested?
Checklist
Additional Notes
This is a cleanup change that removes dead code that was not being utilized by the webhook processing logic. The primary
datafield inWebhookPayloadcontains all the necessary information for handling Patreon webhook events.https://claude.ai/code/session_01B9n2M34zDHnx5NiAKS6R97