30 Days of API Testing Day 23: Resources For Understanding Status Codes


(Heather) #1

30 Days of API Testing Day 23 challenge is:

Status codes are often misused, share your favourite resources for understanding status codes.

I’m quite a visual learner, a picture paints a thousand words and all that :sweat_smile:

I’ve found the HTTP status dogs, in particular, the ones that @g33klady has on her blog, to be the most useful for me in understanding status codes.

https://g33klady.com/category/http-status-coops/


Not getting notifications for all mentions
(Tu Anh Nguyen - KMS) #2

Very interesting pictures which are very understandable :grinning:


(Tu Anh Nguyen - KMS) #3

There is no doubt that MDN web docs is a helpful resource for developers to understand status codes.


(Duong) #4

The article from wikipedia is a very comprehensive list about HTTP status codes.


(Tuan Tran) #5

The first resource I think about is on Wikipedia: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
It contains all HTTP status code.

However, while working to understand details about a status code, I usually google it like that: “XXX HTTP code”. Google will return it very quickly.

Btw, thanks to @brian_seg for the lovely resource.

I am looking for a cat-version for the cat-lover :smiley: :heart_eyes_cat:


(Hilary) #6

ask and you shall receive: https://http.cat/


(duncs) #7

I’m a visual learner as well!

I couldn’t find the particular resource I was looking for, but I did find this & it helps me communicate the status codes with non-techies:


(duncs) #8

The most concise list I could find! :smiley:

HTTP Status Code Summary (via @stevelosh)

1xx: hold on
2xx: here you go
3xx: go away
4xx: you f$%ed up
5xx: I f$
%ed up


(duncs) #9

Finally the HTTP Status Map is a useful interactive resource in the style of a tube / metro map.


(Tuan Tran) #10

Thanks for your information. I love it :heart_eyes_cat:


(rosiecorn) #11

My favourite resource is https://www.restapitutorial.com/httpstatuscodes.html, it is categorized, hence easy to find, and remember


(Will) #12

Amusing and accurate.

Generally the only rule I manage to remember off by heart is the difference between a 4xx and a 5xx.

If the request is and will never be correct in its current form it’s a 4xx, if the user can send that same request without alteration at a later date and expect the server to respond correctly, it’s a 5xx.


(duncs) #13

Nice refinement Will :slight_smile:


(Conor) #14

Working with developers I encourage them to use more specific error status codes and have found things have improved over the years, everything is no longer a 200 :slight_smile:
But generally for a simple API most implementations are
200 - all good
404 - couldn’t find it
500 - service down etc.

My preference is for granularity
If a post created data then return a 201.
e.g. create new user

If the server has successfully fulfilled the request and that there is no content to send in the response payload body, then return a 204.
e.g. save document and allow user to continue editing.

Any thoughts?


(Helena) #15

Understanding HTTP through quotes:

HTTP 100: “Hold the vision, trust the process.”
HTTP 200: “This is the beginning of anything you want. If you can dream it, you can achieve it!”
HTTP 300: " As I look back on my life, I realize that every time I thought I was being rejected from something good, I was actually being re-directed to something better."
HTTP 400: “When someone does something wrong, don’t forget all the things they did right.”
HTTP 500: “I’ve always loved the idea of not being what people expect me to be” / Server


(Hilary) #16

definitely agree on this one - much better than everything getting a 200 and then having some kind of message in the response about what actually happened.
It makes it more user friendly, and usable for other APIs to pick up without having to do special handling


(Luke) #17

Loved pics, awesome stuff


(Ilya Lychkou) #18

All the resources about HTTP Status Codes above are great! I just share a bit info from the origin of HTTP protocol.


(Heather) #19

This was a very busy day on Twitter!


(Trang Ta) #20

I find resources for understanding Status Codes:

  1. https://httpstatuses.com/
  2. https://www.checkupdown.com/status/