Skip to content

By the Octri team · Updated

501 Not Implemented

Share

A 501 means the server doesn’t support the functionality the request needs, on any resource. It’s a 5xx because the gap is on the server’s side, though retrying won’t help until it’s built.

All HTTP status codes

Class
5xx server error
Defined in
RFC 9110, section 15.6.2
Retry
No
Fix
Wait for support
Cacheable by default
Yes

When your API should return 501

Return 501 when your server doesn’t recognise the method at all, or when a documented feature isn’t available yet, like a parameter value reserved for a future release. RFC 9110 makes a 501 cacheable by default, so add Cache-Control: no-store if the feature might ship soon.

If the method is known and this resource doesn’t allow it, that’s a 405. If the feature exists and the account can’t use it, that’s a 403.

How public APIs declare 501 in their OpenAPI specs

Two of the eleven public specs we score declare a 501, as they were on 4 December 2026, on 2 operations each, Asana and OpenAI.

That’s about what you’d expect. A 501 describes something missing, and a spec mostly describes what exists.

APIOperationsDeclare 501How errors are described
OpenAI4062Per status code
Asana3022Per status code
GitHub1,2880Per status code
Stripe6120One default error response
Plaid3510One default error response
Box2970Per status code, plus a default
Twilio1970No error responses
Slack1740One default error response
Adyen Checkout280Per status code
Swagger Petstore190Per status code, plus a default
SendGrid Mail30Per status code

Counted per operation from each vendor’s public OpenAPI document on 4 December 2026.

Declare 501 in your OpenAPI spec

Declare 501 on operations where some options aren’t supported yet, and say which in the description.

yaml
paths:
  /exports:
    post:
      operationId: createExport
      responses:
        "202":
          $ref: "#/components/responses/ExportQueued"
        "501":
          $ref: "#/components/responses/FormatNotSupported"

components:
  responses:
    FormatNotSupported:
      description: The xlsx format isn't available yet. Use csv.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"

What an Octri SDK does with a 501

An Octri SDK maps a 501 to SdkInternalServerError, like every 5xx, and doesn’t retry it. Its default retry list includes 500, 502, 503 and 504 and leaves 501 out, because the answer won’t change on the next attempt.

Check statusCode on the error to tell the two apart, since a 501 calls for a fallback in your code and a 500 calls for a bug report.

typescript
import { Acme, SdkInternalServerError } from "acme-sdk";

const acme = new Acme({ apiKey: process.env.ACME_API_KEY });

async function startExport() {
  try {
    return await acme.exports.create({ format: "xlsx" });
  } catch (err) {
    // 501: xlsx isn't supported yet, so fall back to csv.
    if (err instanceof SdkInternalServerError && err.statusCode === 501) {
      return acme.exports.create({ format: "csv" });
    }
    throw err;
  }
}

More on retries and typed errors in SDK error handling.

HTTP 501 questions

Is a 501 a server bug?

No. It’s a deliberate answer that the server doesn’t support the request. It sits in 5xx because the limit is the server’s, and it shouldn’t page anyone.

Should a 501 say when the feature will ship?

Yes, if you know. A date or a link to your changelog in the body lets the developer plan around it.

Can a 501 come from a proxy?

Yes. A proxy or load balancer that doesn’t support a method, like a WebDAV method, can return 501 before your API sees the request.

Share