501

Not Implemented

개요

501 Not Implemented는 서버가 요청을 처리하는 데 필요한 기능 자체를 지원하지 않는다는 뜻입니다. 서버가 인식하지 못하는 요청 메서드이거나, 아직 구현되지 않은 기능을 호출했을 때 반환됩니다.

405 Method Not Allowed와 비슷해 보이지만 차이가 있습니다. 405는 '해당 메서드를 알지만 이 리소스에는 허용하지 않는다'이고, 501은 '해당 기능/메서드를 서버가 아예 구현하지 않았다'는 서버 측 한계입니다.

언제 발생하나

요청 / 응답 예시

요청
PATCH /api/resource HTTP/1.1
Host: api.example.com
Content-Type: application/json

{"x":1}
응답
HTTP/1.1 501 Not Implemented
Content-Type: text/plain

The server does not support the functionality required to fulfill this request.

코드로 보기

app.all('/api/experimental', (req, res) => {
  res.status(501).send('Not Implemented');
});
# Reject methods the server does not implement
if ($request_method !~ ^(GET|POST|HEAD)$) {
  return 501;
}

흔한 원인

해결 방법

실무 참고

관련 상태코드

관련 헤더

스펙 근거