elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.36k stars 112 forks source link

Add generic :custom_error case to humanize_error_code. #445

Closed kaiserdan closed 3 months ago

kaiserdan commented 3 months ago

Sometimes webservers respond with custom error codes which causes a FunctionClauseError in the humanize_error_code function. This change adds a generic case of the function that handles those cases.

Closes https://github.com/elixir-mint/mint/issues/437.

whatyouhide commented 3 months ago

Nice! We will need a test for this, can you add one?

kaiserdan commented 3 months ago

Does that look good, or is there a better way to test it?

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build fe055988b3caca54bace426d4e8b54f5caf16c71-PR-445

Details


Totals Coverage Status
Change from base Build 4f0c534fa5c0d7b6a4653aeb957bd99c38779560: 0.02%
Covered Lines: 1277
Relevant Lines: 1461

💛 - Coveralls