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

sgerrand / ex_teya / 36339958017
100%

Build:
DEFAULT BRANCH: main
Ran 27 Sep 2026 06:15PM 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

27 Sep 2026 06:15PM UTC coverage: 100.0%. Remained the same
36339958017

push

github

web-flow
feat(error)!: return a Teya.Error for every failed request (#52)

* feat(error)!: return a Teya.Error for every failed request

Specs promised {:error, Teya.Error.t()}, but a request that never got an
answer returned Req's exception as it was, and Payment.get/2 returned
bare atoms and exit tuples. Every failed request now returns a
%Teya.Error{}. When Teya answered, it has a status and code as before.
When it did not, status and code are nil and the new reason field holds
the cause: the exception for a network error, or :timeout, :no_snapshot
or {:exit, reason} from Payment.get/2. The POSLink stream error messages
carry a Teya.Error the same way.

The docs say so, and that without an answer a caller cannot tell whether
Teya acted on the request. The README's token refresh note now gives
the real backoff (1 second, doubling to 1 minute) instead of 10 seconds.

BREAKING CHANGE: network errors come back as
{:error, %Teya.Error{status: nil, reason: exception}} instead of
{:error, exception}, and so do the reasons in {:poslink_payment_error,
...} and {:poslink_receipt_error, ...} messages. Payment.get/2 returns
%Teya.Error{reason: :timeout}, %Teya.Error{reason: :no_snapshot} and
%Teya.Error{reason: {:exit, reason}} instead of the bare values.

* fix(error): keep reply bodies out of errors and mark requests never sent

Req decodes JSON replies itself, and turns a body that will not decode
into {:error, %Jason.DecodeError{}} holding the whole body and no status.
The token path kept that as the error's reason and logged it on a failed
refresh, so a garbled token reply could put an access token or client
secret in the logs, and API calls reported a reply Teya had sent as no
answer at all. Client and Auth now decode JSON themselves: a garbled body
keeps its status and none of its bytes. Teya.Error.from_reason keeps an
exception whole only for network errors, which hold nothing received;
any other keeps just its name.

Every error from Auth.token/0 now has reaso... (continued)

60 of 60 new or added lines in 7 files covered. (100.0%)

402 of 402 relevant lines covered (100.0%)

42.23 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36339958017.1 27 Sep 2026 06:15PM UTC 24
100.0
GitHub Action Run
Source Files on build 36339958017
  • Tree
  • List 24
  • Changed 8
  • Source Changed 8
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36339958017
  • cf27b638 on github
  • Prev Build on main (#36337388883)
  • Next Build on main (#36341592680)
  • 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