Project

General

Profile

Actions

Bug #535

closed

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

Added by Justin Sherrill over 13 years ago. Updated about 13 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
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.

Actions #1

Updated by Paul Kelly over 13 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.

Actions #2

Updated by Ohad Levy over 13 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).

Actions #3

Updated by Justin Sherrill over 13 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

Actions #4

Updated by Justin Sherrill over 13 years ago

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

Actions #5

Updated by Ohad Levy over 13 years ago

  • Target version set to 0.1
Actions #6

Updated by Ohad Levy about 13 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?

Actions #7

Updated by Ohad Levy about 13 years ago

  • Status changed from Feedback to Rejected
Actions

Also available in: Atom PDF