1
00:00:00,020 --> 00:00:00,620
All right.

2
00:00:00,710 --> 00:00:06,410
And up next, let's set up a few more custom error classes, which we're going to use throughout the

3
00:00:06,410 --> 00:00:07,100
project.

4
00:00:07,939 --> 00:00:10,960
And effectively the idea is exactly the same.

5
00:00:10,970 --> 00:00:14,240
For example, this is going to be for bad requests.

6
00:00:14,240 --> 00:00:23,790
So 400, then we have one for 401 the unauthorized, and then we also have one for forbidden.

7
00:00:23,810 --> 00:00:27,500
Now if you just want to copy and paste, that's totally an option.

8
00:00:27,500 --> 00:00:32,180
But in my case, I will set up everything from scratch, sort of.

9
00:00:32,180 --> 00:00:36,650
I mean, I'll still copy and paste a little bit, but not everything from Readme.

10
00:00:36,680 --> 00:00:40,310
So first one is going to be the bad request one.

11
00:00:40,520 --> 00:00:47,270
Again, we just need to come up with the name bad request error and I want to use the same.

12
00:00:47,880 --> 00:00:48,900
Name over here.

13
00:00:50,030 --> 00:00:54,770
And as far as the status code, we are looking for bad requests.

14
00:00:54,770 --> 00:00:57,200
So that's the 400.

15
00:00:58,150 --> 00:01:03,430
Then let's create one for unauthenticated.

16
00:01:04,129 --> 00:01:07,460
You know, let me just type in both places.

17
00:01:12,260 --> 00:01:17,030
And as far as the error, we're looking for 401.

18
00:01:18,100 --> 00:01:19,900
We're looking for unauthorized.

19
00:01:21,150 --> 00:01:22,530
And then lastly.

20
00:01:24,010 --> 00:01:27,790
We have actual unauthorized and that is going to be forbidden.

21
00:01:28,670 --> 00:01:31,370
So again, I want to select in these two places.

22
00:01:37,080 --> 00:01:42,210
And we want to change here to forbidden, which is going to be 403.

23
00:01:43,110 --> 00:01:43,890
Let's save it.

24
00:01:43,890 --> 00:01:47,670
And with this in place, we can start working on the validation layer.

