Bug #535
closed
Creating host entry for an IP that already exists results in 404 BAD REQUEST
Added by Justin Sherrill about 14 years ago.
Updated almost 14 years ago.
Description
Creating host entry for an IP that already exists results in 404 BAD REQUEST. We should return a better message so the caller knows what is wrong.
- Status changed from New to Assigned
- Assignee set to Paul Kelly
Have you looked at the extras/query.rb example file. This shows how additional error information can be retrieved from the HTTPS response. Of course, the information may be missing if this is a bug.
Paul, I think that the point is that it should not return 404, as thats not the correct http response code (404 means object not found, maybe 400, 406 or 412 are more applicable).
So this may be more of a foreman issue then, rather than a smart-proxy issue. In foreman (using the smart-proxy branch). If you try to create a host, that uses an IP address that already exists, the only error you'll see is 400 BAD Request (sorry, i mistyped 404 in the original issue).
According to Ohad a 400 is probably the correct response code, maybe foreman just needs to extract the error message.
Thanks
Paul, I don't see the example you mentioned (extras/query.rb). Id be happy to investigate a bit more.
- Target version set to 0.1
- Status changed from Assigned to Feedback
Paul, is this issue still exists? or was it resolved with recent modifications to how errors are passed through?
- Status changed from Feedback to Rejected
Also available in: Atom
PDF