In my notes, I saw that I had created one last summer, but that seemed to be by pure accident because I added a ‘%’ at the end of some URL. (Not something a user would normally do.)
I am wondering if this is obscure enough that I just don’t worry about it?
As mentioned above, the error displayed in my browser seemed good enough, but I just wasn’t sure if this was something like a 404 error where you definitely need a page to handle it or not.
If I understand correctly, I guess the most common would be when someone typoed a wrong URL eg. if you had http://domain.com/widgetspercent.php
but they tried going to http://domain.com/widgets%.php
they might get a 400 response
The majority of HTTP status codes you probably won’t see in every-day web page serving, but there are quite a few that are used in APIs to provide more detailed responses to the client.
Thee 400 error codes is returned when you make a request to a valid URL, but with missing or malformed headers or parameters. It’s basically the server saying: “OK, you got the right URL, but you’re not making the request correctly”. Take a look at Microsoft’s Azure API docs for some examples of the conditions they return a 400 response for.
If you’re not creating an API and your site only serves web pages then I’d say you probably don’t need it - I’ve never come across one before on a normal website.