Skip to content

Three response fields that did not match the API - #5

Merged
michaeldoehler merged 1 commit into
mainfrom
api-shape-fixes
Sep 14, 2026
Merged

michaeldoehler merged 1 commit into
mainfrom
api-shape-fixes

Conversation

@michaeldoehler

Copy link
Copy Markdown
Contributor

Three fields in this SDK did not match what the API actually sends or
accepts. All three were introduced in 0.2.0 and all three were found by
calling the endpoints against a live instance — the stub fixtures asserted
the shapes the SDK had invented, so they passed.

1. queued should be requeued

inbound retry and bypass read queued from the response. The endpoint
answers:

{"requeued": true, "message": {"id": 55, "...": "..."}}

So both calls returned false and no error, whatever actually happened. Fixed,
and the message the response carries is now exposed too.

2. Subscribers have no name

The create endpoint deserializes address and status only:

struct CreateSubscriber {
    address: Option<String>,
    status: Option<String>,
}

A name was accepted by the HTTP layer and dropped on the floor. The type
promised something the API does not store, so it is gone.

3. The broadcast send takes no tag

POST /streams/{permalink}/campaigns — sorry, /send — deserializes
from, subject, html_body, text_body, template and
template_model. No tag. Dropped for the same reason.

Verified live after the fix: a retry now reports requeued=true with the
message id, instead of a silent false.

inbound retry and bypass read "queued". The endpoint answers with
"requeued", so both returned false and no error, whatever actually
happened. They now read the right key and also expose the "message" the
response carries.

The subscriber types carried a "name". The create endpoint takes an
address and a status; a name is silently dropped, so the field promised
something the API does not store.

All three were found by calling the endpoints against a live instance;
the stub fixtures asserted the shapes this SDK had invented.
@michaeldoehler
michaeldoehler merged commit 6c1fea8 into main Sep 14, 2026
2 checks passed
@michaeldoehler
michaeldoehler deleted the api-shape-fixes branch September 14, 2026 10:21
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.

1 participant