mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* fix(ses): persist inline options on v2 CreateConfigurationSet
CreateConfigurationSet parsed only ConfigurationSetName and Tags,
silently dropping the SendingOptions and SuppressionOptions blocks of
the request. GetConfigurationSet then fabricated a default
SendingOptions ("SendingEnabled": true via the null-means-enabled
effective getter), so a set created with SendingEnabled: false read
back as true, and SuppressedReasons vanished entirely. Real AWS echoes
both blocks verbatim (verified live 2026-06-12).
The controller now parses both blocks onto the ConfigurationSet before
the single store write, with the same structural validation as the
dedicated PUT endpoints (non-object blocks, non-boolean SendingEnabled
and non-string reasons are rejected with BadRequestException). The
service validates suppression reason values at create alongside the
existing tag validation, so an invalid reason rejects the request
without leaving a half-created set behind. The SuppressedReasons
structural parsing is shared with PutConfigurationSetSuppressionOptions
via a common helper.
The remaining five inline option groups (Tracking / Delivery /
Reputation / Vdm / Archiving) have no model fields or endpoints yet
and stay out of scope.
* fix(ses): match AWS error layers on v2 CreateConfigurationSet options
Live verification against real AWS SES V2 (2026-06-13) showed the
endpoint validates inline options in two layers that the previous
commit conflated into BadRequestException:
- Type violations fail in the deserialization layer with
SerializationException: non-object option blocks ("Expected null"),
a non-array SuppressedReasons ("Expected list or null"), and
non-string reason elements / non-boolean scalars for SendingEnabled
(token-style messages such as "NUMBER_VALUE can not be converted to
a String").
- Value violations fail in the validation layer with
BadRequestException using the constraint-style message ("1 validation
error detected: ..."), which differs from the natural-language
sentence the PUT endpoint uses for the same check.
SendingEnabled itself follows AWS deserialization semantics: a missing
member inside a present SendingOptions block defaults to false, any
string coerces to true, and an explicit null fails with a null-message
SerializationException. SuppressionOptions without SuppressedReasons
reproduces the 500 InternalFailure AWS itself returns, so code
developed against Floci fails the same way it would in production.
* fix(ses): align null suppressed-reason handling with AWS on v2 create
Live verification (2026-06-13) shows AWS lets a null element pass the
SuppressedReasons deserialization ("Expected list or null") and rejects
it in value validation with the same natural-language sentence the PUT
endpoint uses, not the constraint-style message reported for invalid
non-null values. CreateConfigurationSet now branches accordingly, the
parsing helper's javadoc documents the intentional null pass-through,
and the FALSE_VALUE token message is covered by a test now that it is
verified rather than inferred.
* fix(ses): make null suppressed-reason branch explicit on v2 create
The null check relied on validateConfigSetSuppressionReason always
throwing, which would silently fall through to the constraint-style
message if that method ever changed. The branch now throws directly,
with the sentence shared through a message helper. Also locks the
verbatim AWS "Expected null" response for non-object option blocks
into a test so the surprising message does not get "fixed" later.