Status Codes Flashcards

1
Q

200

A

Ok

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

201

A

created

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

204

A

No content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

400

A

Bad request

-sending bad data to the server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

401

A

Unauthorized
-Didn’t provide correct credentials.
( We don’t know you. )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

403

A

Forbidden
-you do not have permission to take this action.
( We know who you are but you don’t have permission. )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

404

A

Not Found

the resource you are looking for doesn’t exist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

405

A

Method not allowed
-can not perform this http method on this endpoint
For Example:
POST /user/15 when user already exists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

406

A

Not Acceptable

-Endpoint only supports getting the response in certain format and we asked for a format that was not allowed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

415

A

Unsupported

-server is expecting to get the body in certain content-type, but client sent unsupported content-type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

500

A

Internal Server Error
- the server encountered an unexpected condition that prevented it from fulfilling the request.

5xx codes happen when the backend code doesn’t have any error handling for incorrect body/unsupported header, so server doesn’t know what to do with it and throws 500 error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

503

A

Service Unavailable
-the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is 401?

A

401 means the wrong credentials were provided

server doesn’t know who you are

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What’re the difference between 200 and 400 codes

A

200 codes are typically success codes where as 400 codes indicate a client side error built into the server. Wrong inputs the server understands, catchs, and throws bacl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are 400 and 500 response codes?

A

400 Bad request - means you sent incorrect data and the server has built in error handling for this scenario
500 Internal server error - means you send incorrect data like 400 however the server doesn’t have built in error handling for the scenario.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Status codes 200, 204, 404?

A

200 means ok returns you data

204 means ok returns nothing

404 means the data you requested doesn’t exist