git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nova][dev] Which response code should be returned when migrate is called but the src host is offline?


On Feb 12, 2019, at 12:56 PM, Michael McCune <msm at redhat.com> wrote:
> 
> so, under the given example, i would expect a 5xx status code if the
> server is unable to respond to my request /regardless/ of how i format
> it or what uri i am accessing.

I view 503 as â??something is wrong with the serverâ?? [0], and 409 as â??something is wrong with the resourceâ?? [1]. 

In the scenario described, there is nothing wrong at all with the servers handing the request. There is, however, a problem with the resource that the request is trying to work with. Of course, the advice in the docs to include enough in the payload for the client to understand the nature of the problem is critical, no matter which code is used.

[0] https://tools.ietf.org/html/rfc7231#section-6.6.4
[1] https://tools.ietf.org/html/rfc7231#section-6.5.8

-- Ed Leafe