7. Handling errors

Want to be growth & monetisation Product Manager at FAANG?
Learn pricing case studies of LinkedIn, Bumble, Tinder, Unacademy & many more
πŸ‘‰ Use Promo code - API10 and get 50% off

Error handling

Throughout this course, we've been discussing only requests. What if we made the wrong request?

Open this URL - https://google.com/checkingerror in your browser. You must be seeing a message.

When you hit this URL in your browser; you are making a request to the Google server. The Google server has no endpoint named checkingerror and hence it returns a 404 error (i.e. resource not found). When we make a wrong request, we will get an error code.

drawing

So, by understanding the status code you can immediately tell what’s happened to your request.

There are four groups of status codes βž–

Within each group, there are specific numbers too, that give us more details about the responses but really knowing just the four general groups, is usually enough.

πŸ†— Status codes in the 200s tell us everything is okay. (i.e. we made the right request & got the correct response)

πŸ” 300 status codes tell us that we've been redirected to the appropriate resource.

β›” 400 status codes tell us that there was a problem on our end.Β (Something wrong with our request)

πŸ› οΈ 500 status codes tell us that there's something wrong on the end of the server.

drawing

You can refer to this website and check the most common status codes - https://http.cat/

Why can't great products like Twitter & Whatsapp monetise?
Deep dive into the exciting world of product monetisation
πŸ‘‰ Use Promo code - API10 and get 50% off