원래는 400 Bad Request를 썼다
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. - RFC 2616
하지만 API 스펙에 명시된 바를 보면 400은 클라이언트의 잘못된 문법으로 서버가 이해하지 못했을 때 응답하는 건데 우리의 상황에는 맞지 않아보인다
409 Conflict
The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. The server SHOULD generate a payload that includes enough information for a user to recognize the source of the conflict. - RFC 7231
409는 현재 상태와 충돌이 생겨 요청을 수행할 수 없을 때 쓰는 거다.
현재 요청한 이메일 or 닉네임이 db에 이미 있어 기존 자원과 충돌을 일으키는 상태이므로 409가 적합해 보인다.
409 당첨!