chocolatey-community / simple-server

The Chocolatey Simple Server - https://community.chocolatey.org/packages/chocolatey.server
Apache License 2.0
44 stars 17 forks source link

FEATURE REQUEST: (406) Not Acceptable - change error message to be more informative #31

Closed bcurran3 closed 2 years ago

bcurran3 commented 6 years ago

(from https://github.com/chocolatey/simple-server/issues/26)

It should be noted that you can't push and overwrite (same version) packages, you must delete the existing package first. "Failed to process request. 'Not Acceptable'. The remote server returned an error: (406) Not Acceptable.." was scary until I figured it out.

IMHO: "Not Allowed" seems more appropriate than "Not Acceptable." Some info as to why would be very useful - i.e. a link to some documentation or saying "Package immutable. Delete package files from server and attempt again."

captainjs commented 5 years ago

True, the error is quote misleading. I used ansible and got the same error:

"stdout_lines": [

09:50:59 |   |   | "Chocolatey v0.10.13", 09:50:59 |   |   | "Attempting to push 0.10.13.nupkg to http://x.x.x.x/", 09:50:59 |   |   | "Failed to process request. 'Not Acceptable'. ", 09:50:59 |   |   | "The remote server returned an error: (406) Not Acceptable.."

It's simply because it's already there. A message like you suggested surely would help understanding what is happening.

gep13 commented 2 years ago

I believe an upstream change in Chocolatey is now helping with this problem.

I just tried to recreate it, and this is what I got:

2021-09-29_09-24-22

As such, I am going to go ahead and close this issue. If you feel that more work is required here, feel free to comment on the issue again.