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.

7
  • The 4xx status codes above 400 have very specific meanings. Choose 400 if your case isn't specifically covered by the others. Commented Sep 25, 2017 at 22:32
  • 1
    @jpmc26 If I don't use the status codes this way, then they are never used. But feel free to use them the right and proper way in your answers. Commented Sep 25, 2017 at 22:55
  • In some sense, you're right. They're never used. The meanings chosen for the specific codes don't seem to be very common use cases for most applications. That's okay. There are lots of exceptions we never write code to catch, either. Commented Sep 25, 2017 at 22:57
  • @jpmc26 Well exceptions are not the greatest model to follow. But sure, go ahead. Commented Sep 25, 2017 at 23:06
  • Not throwing or catching for specific exception types is the analog to not ever using specific HTTP codes or any other error codes. I assumed this would be obvious. Whether an exception model is "the best" is utterly irrelevant to the point. Commented Sep 26, 2017 at 16:25