• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sgerrand / ex_teya / 36260329413
100%

Build:
DEFAULT BRANCH: main
Ran 26 Sep 2026 05:48PM UTC
Jobs 1
Files 24
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Sep 2026 05:48PM UTC coverage: 100.0%. Remained the same
36260329413

push

github

web-flow
feat: opt-in retries for POSTs that are safe to repeat (#47)

* feat: opt-in retries for POSTs that are safe to repeat

POSTs were never retried, since repeating one could charge a card twice.
But Teya's specs document the Idempotency-Key header on nine of them:
repeated with the same key, they return the first answer rather than
acting again. With config :teya, retry_idempotent_posts: true, those nine
are retried on a network error, 408, 429 or 5xx, through Req's
retry: :transient, sending the same key on every attempt.

They go through a new Client.idempotent_post/2. Other writes, such as
receipts, reversals and cancellations, still use Client.request/3 and are
sent once. A :retry set in :req_options still wins.

* docs: say a retried POST may fail even though the first attempt worked

If the first attempt reached Teya but its response was lost, the retry
can come back as an error, such as a 409 for a key already used, rather
than the first answer. Say so, and tell callers to check the outcome
before trying again with a new key.

* docs: put the subscribe sentence back with the path id rules

The sentence about the subscribe functions raising ended up after the one
about query parameters, and was wrapped past the line length.

* fix(client): bound retry waits and send each retry with a current token

Retried POSTs used Req's retry: :transient, which waits out any
Retry-After in full: a 503 asking for an hour blocked the caller for an
hour, up to three times. They now use a retry function with the same
rules, except that a 429 or 503 asking for more than 10 seconds, or with a
Retry-After that cannot be read, comes back at once.

The token was fetched once and reused on every attempt, so retries that
ran past its expiry came back as a 401. Each retry of a request made with
the auth process's token now asks it for its current one. A request made
with a caller's own token, such as ePOS registration, keeps that token.

The README lists exactly what is re... (continued)

33 of 33 new or added lines in 10 files covered. (100.0%)

357 of 357 relevant lines covered (100.0%)

30.89 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36260329413.1 26 Sep 2026 05:48PM UTC 24
100.0
GitHub Action Run
Source Files on build 36260329413
  • Tree
  • List 24
  • Changed 10
  • Source Changed 10
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36260329413
  • c7c97814 on github
  • Prev Build on main (#36250840579)
  • Next Build on main (#36274656557)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc