openflighthpc / metal-server

Eclipse Public License 2.0
0 stars 1 forks source link

Fix the 404 error message for `boot-methods` #15

Closed WilliamMcCumstie closed 5 years ago

WilliamMcCumstie commented 5 years ago

When testing out the client, the following response was received:

# bin/metal api post boot-methods something-blue
{
  "status": 409,
  "url": "http://localhost:80/boot-methods",
  "http_verb": "POST",
  "request_headers": {
    "Authorization": "Bearer REDACTED",
    "Content-Type": "application/vnd.api+json",
    "User-Agent": "Faraday v0.16.2"
  },
  "request_body": {
    "data": {
      "type": "boot-methods",
      "id": "something-blue",
      "attributes": {
      }
    }
  },
  "response_headers": {
    "date": "Wed, 06 Nov 2019 16:01:31 GMT",
    "connection": "close",
    "content-type": "application/vnd.api+json",
    "content-length": "175"
  },
  "response_body": {
    "errors": [
      {
        "id": "cbce1371-3cd9-4dca-b638-7f67c477c941",
        "title": "Conflict Error",
        "detail": "Can not create the 'dhcp-host' as 'something-blue' already exists",
        "status": "409"
      }
    ]
  }
}

The details contain a reference to dhcp-hosts which is wrong. Also confirm the error message is correct for the other end points