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

sgerrand / ex_teya / 35980766899
100%

Build:
DEFAULT BRANCH: main
Ran 24 Sep 2026 09:22AM UTC
Jobs 1
Files 20
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

24 Sep 2026 09:21AM UTC coverage: 100.0%. Remained the same
35980766899

push

github

web-flow
fix(sse): cut an oversized error chunk instead of copying it whole (#42)

* fix(sse): cut an oversized error chunk instead of copying it whole

The 8 KB cap was checked before appending, so it never bounded the first
chunk. Req's plug adapter hands a response that is not chunked to the
collector as a single piece, so a large gateway error page was copied
into the task in full and only trimmed on the next chunk, which never
came.

The chunk is now cut to what is left of the budget before it is appended.
take_error_body/2 is exposed for tests, since the kept body is not
visible through Teya.Error, which quotes only the first 500 characters.

* fix(sse): keep a large JSON error readable and stop reading past the cap

Cutting a body mid-JSON left Req's decoder with broken input, and it
answers that with an exception in place of the response — so a JSON error
over the cap reached the caller as a Jason.DecodeError with no status at
all, where before the cut it was a %Teya.Error{} with the code.

The body is decoded here now, with the raw text kept as the message when
it will not parse, so the status always survives. The cap moves to 64 KB,
comfortably above an API error listing many invalid parameters but still
bounded, since a cut body cannot be decoded at all.

Once the budget is spent the collector halts rather than reading a whole
error page off the wire to throw it away, which also frees the connection
instead of holding it until the receive timeout.

* fix(sse): make the error body cap configurable and test it end to end

The test named for an oversized body stopped producing one when the cap
rose to 64 KB, and its only assertion — that the message is at most 512
bytes — holds however the cap behaves, since Teya.Error quotes just the
first 500 characters. Removing the cap altogether left the suite green.

The cap now reads :sse_max_error_body_bytes, so a test can set a small
one and check what the caller actually gets: a status, the quoted start
of th... (continued)

21 of 21 new or added lines in 1 file covered. (100.0%)

170 of 170 relevant lines covered (100.0%)

12.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 35980766899.1 24 Sep 2026 09:22AM UTC 20
100.0
GitHub Action Run
Source Files on build 35980766899
  • Tree
  • List 20
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35980766899
  • b0664317 on github
  • Prev Build on main (#35831876402)
  • Next Build on main (#36008612957)
  • 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