gleam-lang / hexpm-rust

⚗️ A Rust client for the Hex package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Misleading error reporting when upload of package fails.

keroami opened this issue · comments

publish_package_response produces LateModification on UNPROCESSABLE_ENTITY.

The handling suggests it is expecting late modification, somehow, but the code stems from http, which has no such notion?

The default handler provides us with unexpected_response, including body, which may contain useful information (it did in my case, I was stuck until I printed it and learned what the real problem was, instead of 'late modification').

Thanks for the report. I agree this is insufficient and at times misleading. Unfortunately the Hex API docs are very lackluster so at the time of writing it seemed that this was an appropriate error to surface.