Skip to content

[FEAT]: Requests returning HTTP 410 Gone should not be retried #620

@camchenry

Description

@camchenry

Describe the need

As part of the Projects (classic) sunset, these REST APIs are returning HTTP 410 to indicate that the APIs are no longer available.

According to the spec for the 410 status code, this is mechanically very similar to HTTP 404 and the recommendation is to even cache the request:

The 410 (Gone) status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. If the origin server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) ought to be used instead.
[...]
A 410 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see Section 4.2.2 of [CACHING]).

https://www.rfc-editor.org/rfc/rfc9110.html#name-410-gone

Based on this information, I believe that requests which return a 410 status code should not be retried, as the server has indicated future requests will also return a 410 temporarily or permanently. This saves on unnecessary network requests, which helps ensure that clients are better able to stay under the API rate limits.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions