Project

General

Profile

Bug #535

Creating host entry for an IP that already exists results in 404 BAD REQUEST

Added by Justin Sherrill almost 10 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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.

History

#1 Updated by Paul Kelly almost 10 years ago

  • 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.

#2 Updated by Ohad Levy almost 10 years ago

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).

#3 Updated by Justin Sherrill almost 10 years ago

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

#4 Updated by Justin Sherrill almost 10 years ago

Paul, I don't see the example you mentioned (extras/query.rb). Id be happy to investigate a bit more.

#5 Updated by Ohad Levy almost 10 years ago

  • Target version set to 0.1

#6 Updated by Ohad Levy almost 10 years ago

  • 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?

#7 Updated by Ohad Levy over 9 years ago

  • Status changed from Feedback to Rejected

Also available in: Atom PDF