You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
Per RFC 7231, 404 Not Found "does not indicate whether this lack of representation is temporary or permanent; the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent."
As far as I can tell, everything we return 404 for is indeed permanent. Perhaps we should switch to 410 Gone, which "indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. [...] The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed."
The text was updated successfully, but these errors were encountered:
This is a good point. We could definitely return a 410 for error code 103 (valid endpoint token, but the user agent ID isn't in the database) and 106 (subscription ID not in database—though, since the endpoint token is valid, the subscription existed at one time). 102 (invalid endpoint token) should probably be a 400.
Previously 404 was returned for multiple classes of errors when the endpoints
would never in fact be good, so a 410 is appropriate. In one case a 404 was
returned instead of a 400 which properly addresses the fact that the URL was
not validly constructed.
Closes#312
Per RFC 7231, 404 Not Found "does not indicate whether this lack of representation is temporary or permanent; the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent."
As far as I can tell, everything we return 404 for is indeed permanent. Perhaps we should switch to 410 Gone, which "indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. [...] The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed."
The text was updated successfully, but these errors were encountered: