DEV Community

Cover image for HTTP status codes - What happened to dev.to ?
Younes
Younes

Posted on • Edited on • Originally published at blog.yafkari.dev

HTTP status codes - What happened to dev.to ?

Hello everyone,
Today, I will speak about HTTP status codes.

Yesterday at 7:30 pm, I was giving a look to Github and, I don't know why, I needed to visit dev.to.
But when I tried to load the page, I received a beautiful 'Error 503' with a dog looking at me! 😝

And that's how I found myself writing this little post to you.

"Always look on the bright side of life." πŸŒ”, My mom.

So...here we go!

First of all, why do we need a status code?

A status code is a little message from the server that tells you how things went with your request (if everything went well, etc...).
So you can imagine how necessary it is to get feedback on the status of a request.

There are several status codes and each one is dedicated to a specific situation.

Categories

The HTTP status codes are divided into 5 different classes defined by the first number they are composed of.

Here is a list of the classes described in the RFC 7231, page 47:

  • 1xx: Informational - Request received, continuing process
  • 2xx: Success - The action was successfully received, understood, and accepted
  • 3xx: Redirection - Further action must be taken in order to complete the request
  • 4xx: Client Error - The request contains bad syntax or cannot be fulfilled
  • 5xx: Server Error - The server failed to fulfill an apparently valid request

A quick look at the most frequent status codes

The number one is, of course, the famous:

  • Error 404 Not Found
    ERr0r4O4
    This error occurs when the resources you ask doesn't exist, try to check the orthography and stay calm πŸ™πŸ˜„.

  • 503 Service Unavailable
    ERr0r5O3
    The error I had the good fortune to see yesterday appears mainly when the server is busy (overloaded by too many requests ?) or when the server is in maintenance.
    It is usually temporary, so be patient!

  • 200 OK
    are you sure everything is fine ??
    A normal user doesn't even know about its existence, this status code means that everything goes well.
    You asked for X, I found it, and I've shown it to you.

  • Etc...
    an image
    There is a lot of HTTP status code, so I let you see by yourself here.

As you can see the most frequent status codes are errors πŸ˜­πŸ˜‚.

So that's it for this article, like every time, feel free to remind me if I forgot something 😜

I know, I know, you're sad.
But I will come back as soon as possible with other better posts than the previous one. (I hope so)

Top comments (12)

Collapse
 
cutiko profile image
Erick Navarro

418 Im a tea pot

Collapse
 
phallstrom profile image
Philip Hallstrom

For the first time in 25 years of development I actually got to use that in a production system. It was for a brief lived feature where I needed to ensure I wouldn't step on another status' toes so worked wonderfully.

Collapse
 
thecodingalpaca profile image
Carlos Trapet

I'm genuinely very jealous

Collapse
 
yoadev profile image
Younes

how could I forget it πŸ˜­πŸ˜‚

Collapse
 
ben profile image
Ben Halpern

Well this post is evidence that the service did come back online eventually πŸ˜„

Actually, due to edge caching, most pages were still deliverable despite issues with the central application.

Collapse
 
yoadev profile image
Younes

Yes, it only lasted a few minutes, thankfully πŸ˜„.

Effectively, I noticed it later.

Collapse
 
tadaboody profile image
Tomer

If you're looking for a visual map. http.cat is a great resource

Collapse
 
yoadev profile image
Younes

Quite interesting. Thank you ! πŸ˜‚

Collapse
 
ballpointcarrot profile image
Christopher Kruse

For easy reference, who can say no to puppies? httpstatusdogs.com

Collapse
 
yoadev profile image
Younes

πŸ˜‚πŸ‘Œ

Collapse
 
yoadev profile image
Younes

I'll do better next time. πŸ˜…

Thank's for the feedback !

 
yoadev profile image
Younes

it wasn't my goal, sorry for that πŸ˜‚πŸ˜