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

sgerrand / ex_teya / 36173176686
100%

Build:
DEFAULT BRANCH: main
Ran 25 Sep 2026 06:24PM UTC
Jobs 1
Files 22
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

25 Sep 2026 06:24PM UTC coverage: 100.0%. Remained the same
36173176686

push

github

web-flow
feat(error)!: richer errors and a library user agent (#40)

* feat(error)!: richer errors and a library user agent

Teya.Error keeps the invalid_parameters list the API sends when it says
which request fields it rejected, and the moduledoc now lists the full set
of shared codes rather than five of them.

Token endpoint failures use the OAuth 2.0 error format, so from_response/1
reads "error" and "error_description" too. Teya.Auth now returns a
%Teya.Error{} for a non-200 reply instead of a raw %Req.Response{}, which
is what its callers' typespecs already promised.

Every request sends User-Agent: teya-elixir/<version>, which Teya
recommends so they can identify the integration.

BREAKING CHANGE: a failed token fetch returns {:error, %Teya.Error{}}
rather than {:error, %Req.Response{}}. Transport failures still return the
underlying Req exception.

* fix(client): merge configured headers instead of replacing them

Review follow-ups on the user agent change.

Req options are merged last, so a headers list set in :req_options
replaced the one built in the client. That dropped the auto-generated
Idempotency-Key from every POST and PATCH — a retried payment after a
timeout could charge twice — and the README had just started telling
people to set that option. On the SSE path it went the other way: headers
joined the winning side of the merge, so headers configured for a stream
were silently dropped.

Both paths now fold the two lists together by name: a configured header
wins, and the rest of the library's own headers survive.

The OAuth error shape also moves to Error.from_oauth_response/1, used only
by the auth path. An API error body that happens to carry an "error" key
is a gateway page, and keeping its detail as the message says more than
lifting a non-Teya value into code.

* fix(client): name atom headers the way Req does

Req turns an atom header name into a string with underscores replaced by
dashes, so :user_agent is the "user-agent" header. merg... (continued)

56 of 56 new or added lines in 4 files covered. (100.0%)

269 of 269 relevant lines covered (100.0%)

20.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36173176686.1 25 Sep 2026 06:24PM UTC 22
100.0
GitHub Action Run
Source Files on build 36173176686
  • Tree
  • List 22
  • Changed 7
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36173176686
  • 7a157d5c on github
  • Prev Build on main (#36126855899)
  • Next Build on main (#36190828621)
  • 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