DEV Community

Discussion on: Choosing the right error code 401, 403, or 404

Collapse
 
merri profile image
Vesa Piittinen • Edited

Then there is the under utilized 410 Gone. The biggest issue with 410 is that you often need a human to decide that "this resource will never come back again" and not many think about lifecycling their urls. I'd say it is a good idea for most content to have a lifecycle, and to think what happens once the content will no longer be available. Possible solutions are to redirect to a newer resource (such as newer version of a product) or to indicate something as fully gone but that it did exist at one point. This is a huge difference to 404 which is very generic and you can't tell if it was correct in the past or you have an incorrect link or why it doesn't work.