Correct HTTP status code for existent resource, but non-existent entity?

前端 未结 3 1936
一生所求
一生所求 2021-01-01 16:45

Say the client is requesting the following URL:

/user-details?user=123

If /user-details was a non-existing resource, the corre

3条回答
  •  再見小時候
    2021-01-01 17:11

    Try 422 which is used in WebDav? See http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

    For me 404 status is ok too (better normed actually), 400 is too vague.

提交回复
热议问题