Skip to content

404 instead of 405 for unsupported HTTP methods isn't documented #45184

Description

@jornith

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api

What part(s) of the article would you like to see updated?

The 404 section covers one cause of 404s (masking private-repo existence). It doesn't cover this one: an HTTP method a route doesn't support also returns 404, not 405.

Example: DELETE on a read-only endpoint → 404, not the 405 you'd expect from RFC 7231.

Add a line so people don't debug a "missing resource" that's actually a wrong verb.

Additional information

Reliably reproducible. Verified with a black-box pytest suite: test_unsupported_method_is_masked_as_404 in https://github.com/jornith/octoprobe

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamrestContent related to rest - overview.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions