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

elixir-mint / mint / e4ccc06f9a4aeeed774a3d83c38cf50d5fdbe94e
91%

Build:
DEFAULT BRANCH: main
Ran 02 Dec 2026 07:10PM 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

02 Dec 2026 06:54PM UTC coverage: 90.956% (+0.3%) from 90.683%
e4ccc06f9a4aeeed774a3d83c38cf50d5fdbe94e

push

github

web-flow
Add :closed_reason to Mint.HTTPError for closed connections (#555)

* Add :closed_reason to Mint.HTTPError for closed HTTP/2 connections

After an HTTP/2 connection is closed, request/5 and stream_request_body/3
returned %Mint.HTTPError{reason: :closed} with no way to tell why the
connection closed. The connection now remembers the cause and the error
carries it in a new :closed_reason field (:client_closed, :remote_closed,
:recv_failed, :send_failed, :goaway, :invalid_frame), which is also
included in the message. :reason stays :closed.

* Set :closed_reason for HTTP/1 connections too

Mint.HTTP1 now records why the connection was closed, so a later
request/5 or stream_request_body/3 returns the same :closed_reason as
in HTTP/2. :invalid_frame is renamed to :protocol_violation, which fits
both protocols, and :server_requested_close is added for responses that
don't keep the connection open (connection: close, or HTTP/1.0 without
keep-alive).

* Keep the first :closed_reason when a closed connection gets socket messages

A connection that Mint closed without closing the socket, such as after a
failed send, a GOAWAY during the HTTP/2 handshake or a failed setopts call,
still receives {:tcp_closed, socket} or {:tcp_error, socket, reason}.
Passing those to stream/2 replaced the reason with :remote_closed or
:recv_failed.

* Use :limit_exceeded when an HTTP/1 response goes over max_header_list_size

A response line or header section over the :max_header_list_size option
closed the connection with :protocol_violation, although the server sent
valid HTTP.

* Leave Mint.HTTPError.closed_reason() open to new values

The other error reason types end in term() or are term(), so new reasons
can be added without changing the type's contract.

* Use :limit_exceeded when HTTP/2 header block fragments go over the bound

Buffered header block fragments over the bound derived from the
max_header_list_size client setting closed the connection with
:protocol_violation, ... (continued)

48 of 50 new or added lines in 3 files covered. (96.0%)

2 existing lines in 1 file now uncovered.

1921 of 2112 relevant lines covered (90.96%)

719.32 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
89.11
1.55% lib/mint/http1.ex
1
95.79
-0.11% lib/mint/http2.ex

Coverage Regressions

Lines Coverage ∆ File
2
95.79
-0.11% lib/mint/http2.ex
Jobs
ID Job ID Ran Files Coverage
1 e4ccc06f9a4aeeed774a3d83c38cf50d5fdbe94e.1 02 Dec 2026 07:10PM UTC 22
90.96
GitHub Action Run
Source Files on build e4ccc06f9a4aeeed774a3d83c38cf50d5fdbe94e
  • Tree
  • List 22
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • e4ccc06f on github
  • Prev Build on main (#227E72F1...)
  • 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