Skip to content

fix: Add support for DISABLED status in SES verdict enums (#110)#111

Merged
sebsto merged 3 commits intomainfrom
sebsto/fix110
Jan 29, 2026
Merged

fix: Add support for DISABLED status in SES verdict enums (#110)#111
sebsto merged 3 commits intomainfrom
sebsto/fix110

Conversation

@sebsto
Copy link
Collaborator

@sebsto sebsto commented Jan 26, 2026

Motivation:

AWS SES can return "DISABLED" as a valid status value for spam, virus, DKIM, and SPF verdicts when certain checks are disabled in the SES configuration. However, the SESEvent.Receipt.Verdict.Status enum was missing this case, causing JSON decoding to fail with a DecodingError when parsing SES events containing {"status":"DISABLED"}.

This issue was reported in #110, where users encountered parsing failures when processing legitimate SES events from AWS that included disabled verdict checks.

Modifications:

Added .disabled = "DISABLED" case to the SESEvent.Receipt.Verdict.Status enum in
SES.swift
Converted the existing test to a parameterized test using Swift Testing's @Test(arguments:) syntax
Added a new test case (eventBodyDisabled) that includes a SES event with spamVerdict.status set to "DISABLED"
Updated the test assertion to verify both .pass and .disabled status values are handled correctly

Result:

SES events with verdict statuses set to "DISABLED" will now decode successfully without throwing errors. The library correctly handles all valid AWS SES verdict status values: PASS, FAIL, GRAY, PROCESSING_FAILED, and DISABLED. The parameterized test ensures both standard and disabled verdict scenarios are validated automatically.

@sebsto sebsto self-assigned this Jan 26, 2026
@sebsto sebsto added the 🔨 semver/patch No public API change. label Jan 26, 2026
@sebsto sebsto linked an issue Jan 26, 2026 that may be closed by this pull request
@sebsto sebsto changed the title fix #110 fix: Add support for DISABLED status in SES verdict enums (#110) Jan 26, 2026
@sebsto sebsto mentioned this pull request Jan 26, 2026
@sebsto sebsto requested a review from Copilot January 29, 2026 07:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for AWS SES verdict status "DISABLED" so SES events with disabled checks decode correctly instead of failing JSON decoding.

Changes:

  • Add .disabled = "DISABLED" to SESEvent.Receipt.Verdict.Status.
  • Extend SES decoding tests with a new fixture containing "status":"DISABLED".
  • Convert the SES JSON decoding test to a parameterized Swift Testing test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Sources/AWSLambdaEvents/SES.swift Adds the missing DISABLED enum case so SES verdicts can decode successfully.
Tests/AWSLambdaEventsTests/SESTests.swift Adds a disabled-status SES fixture and runs the decoding test against both fixtures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sebsto sebsto merged commit d18360e into main Jan 29, 2026
21 of 22 checks passed
@sebsto sebsto deleted the sebsto/fix110 branch January 29, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SES spamVerdict Status

2 participants