Skip to content

Record the short URL and Basic endpoints - #3

Merged
terrylinooo merged 2 commits into
mainfrom
feat/short-url-fixtures
Aug 6, 2026
Merged

Record the short URL and Basic endpoints#3
terrylinooo merged 2 commits into
mainfrom
feat/short-url-fixtures

Conversation

@terrylinooo

Copy link
Copy Markdown
Contributor

Recorded the short URL and Basic endpoints against a live account, the same
way the SMS ones were done, and built tests on what came back. Everything
created during the run was deleted again.

The two documented traps now have evidence

A slug is ignored unless the request names one of your own verified
domains.
Asked for /this-slug-is-ignored, got a generated path on a
default domain, with a 200 either way.

An unrecognised domain is substituted, not refused. Asked for
not-a-real-domain.invalid, got a default domain back — again a 200.

Neither response says anything was dropped, so comparing the returned URL is
the only way to notice. Both are now pinned by tests; until now the README
described them and nothing checked them.

Three more things worth having on file

A miss is a 200 with an empty data array, not a 404. The batch version
returns nulls in the positions asked for, which is what keeps results from
silently shifting.

A Basic key used against the short URL endpoints is refused with 400 and a
message about shortening
— which points nowhere near the real cause, that
it is a key for a different API. The batch endpoints refuse it the same way,
and both map to PermissionException.

The Basic client had no feature test at all. It has one now: the returned
URL, the request payload, and the credential and Accept headers.

Notes

Fixture hosts and the brand name in the SMS fixtures are placeholders; the
recordings they came from are not committed.

110 tests, up from 100.

🤖 Generated with Claude Code

terrylinooo and others added 2 commits August 6, 2026 20:31
Fifteen responses recorded against a live account, and the two documented
traps now have evidence behind them: a slug asked for without one of your own
verified domains comes back as a generated path, and an unrecognised domain
is quietly replaced by a default one. Both answer 200, so nothing but
comparing the returned URL reveals what happened.

Three other things worth having on file. A miss is a 200 with an empty data
array rather than a 404. A Basic key used against the short URL endpoints is
refused with 400 and a message about shortening, which points nowhere near
the real cause — that it is a key for a different API — and the batch
endpoints refuse it the same way. Every URL created while recording was
deleted again.

The Basic client had no feature test at all; it has one now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The recorded content carried the real registered brand name. Nothing depends
on it, and a fixture is read far more often than it is recorded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@terrylinooo
terrylinooo merged commit f7cd32e into main Aug 6, 2026
9 checks passed
@terrylinooo
terrylinooo deleted the feat/short-url-fixtures branch August 6, 2026 12:34
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