hexpm / hex

Package manager for the Erlang ecosystem.
https://hex.pm
972 stars 184 forks source link

Improve error message when a package already exists #949

Closed bortzmeyer closed 6 months ago

bortzmeyer commented 2 years ago

Trying to hex publish a package when there is already one with this same name prints:

Publishing failed
account not authorized for this action

The error message is misleading, it has nothing to do with the account you use. Something like "package with the name foobar already exists" would be more sensible, IMHO.

Coreastreet commented 1 year ago

Hi bortzmeyer,

I wrote a basic fix. Hope it may be useful to future users.

Regards, Coreastreet

Coreastreet commented 1 year ago
Screenshot 2023-07-27 at 10 35 00 am
Coreastreet commented 1 year ago

The picture illustrates the new error response.