swsnu / swppfall2019

31 stars 23 forks source link

[HW3] response status priority 관련 질문 #171

Open khsoo01 opened 4 years ago

khsoo01 commented 4 years ago

Please make sure to implement your request methods under the following global specifications:

Among these global specifications, the prior specification has the higher priority. For example, if someone requests for a non-existing article without signing in, response with 401 instead of 404.

과제 스펙에 위와 같은 내용이 나와 있는데요, priority가 405 > 401 > 404 > 403로 배정되어 있어 여러 개의 오류가 동시에 일어나면 더 priority가 큰 status로 return한다는 것으로 이해했습니다.

그런데 400의 priority에 대해서는 언급이 없어서 이에 대해 물어보고 싶습니다. Decode가 실패하면 400으로 response해야 하는데, 400이 401, 403, 404, 405와 동시에 발생할 수 있어 어떤 순서로 처리해야 되는지 명확하지 않은 것 같습니다.

400이 가장 낮은 priority로, 405 > 401 > 404 > 403 > 400 순서라고 이해하면 될까요?

kyunggeunlee commented 4 years ago

네, 그렇게 이해하셔도 좋습니다. 다만 Error status code의 priority 자체는 걱정하실 필요는 없습니다. 두 가지 이상의 조건에 동시에 해당되는 경우는 테스트하지 않을 예정입니다. 예를 들어 허용하지 않은 Method를 사용해 decode할 수 없는 payload를 보내는 경우는 테스트하지 않습니다.