Loading
Current section: Loading 4 exercises
Problem

Handling Error Messages

Transcript

00:00 So, this works fine until you decide you want to try something funny and then you get a big kablooey with an error message that really isn't all that useful. We'll take care of handling error messages and making them look nice in a future part of this workshop, a

00:18 future exercise, but we do want to make things work a little bit nicer for us during our development time, and that means making TypeScript happy. Again, I repeat over and over again, TypeScript isn't making your life terrible, it's just showing you how terrible your life

00:34 is and just letting you know, hey, you've got to think about these cases. So, like I said, we'll make this error page look a lot nicer in a future exercise, but for right now I just want you to handle situations where the user data does not exist. Additionally,

00:51 right here we're getting an application error, so we're getting a 500. We want to get a 404 for this type of a thing, so we're going to be handling those status codes properly in this exercise and also making it a nicer developer experience for us, and then in a future exercise we'll actually make this look pretty. So, go ahead and let's take care of the status

01:11 code and handling those errors, making TypeScript happy, and then I'll see you when you're done.