Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    400 symbolizes a bad request. The message should define what input was incorrect and what input is expected. Commented Sep 9, 2016 at 8:29
  • you're right.. I'm editing the answer :) Commented Sep 9, 2016 at 13:48
  • Also, you could add the case when a token is not provided. Commented Sep 9, 2016 at 15:26
  • Well, it'd still a Bad Request hence the 400 status code. Specifying it might be better though. Commented Sep 9, 2016 at 17:38
  • 1
    Yes, but even if it leads to return the same status, you still have to check ;) ! Consider also, in case of a 4xx status code, that problem details could be provided in the response body. A recent RFC (rfc-editor.org/rfc/rfc7807.txt) cover this needs. Commented Sep 9, 2016 at 20:23