hexpm-rust icon indicating copy to clipboard operation
hexpm-rust copied to clipboard

Misleading error reporting when upload of package fails.

Open keroami opened this issue 2 years ago • 1 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').

keroami avatar Feb 12 '23 19:02 keroami

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.

lpil avatar Feb 13 '23 14:02 lpil