swsnu / swppfall2021

Learning Software Engineering By Building Web Services
28 stars 19 forks source link

Regarding error status codes #110

Open ttoru96 opened 2 years ago

ttoru96 commented 2 years ago

We've updated FAQ section of this document with more explanation on error status codes, so please have a look. Changes made are as follows.


Q1. What is the priority for the error status codes? A1. The priority between error status codes is 405 > 401 > 404 > 403, same as what is stated in spec. However, you do not need to worry about cases that are combinations of 400 + (405, 401, 404, 403). That is, we do not test cases in which the user sent un-decodable payload with not allowed HTTP request.

Q6. Should we handle 400 bad request? A6. Handling 400 bad request is a good practice, and we've covered how to catch KeyError and JSONDecodeError during practice session. We recommend you to handle 400 for the better code quality of your DJango API server. However, we do not test 400 for this HW. That is, you may assume that frontend always sends well-formatted data.


Sorry if it caused you any confusion, and let us know if you have further questions.