Downloading or deleting a file that no longer exists answers 500 instead of 404 #162
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in a code audit on 2026-10-09.
POST /api/enclosures/{id}/downloadandDELETE /api/enclosures/{id}(src/web.rs:1731,src/web.rs:1761) answer a file id that does not exist with a 500, logged as anapi errorwarning, because the missing row is raised withanyhow!, whichApiErrorturns into a server error. A page left open after a feed was forgotten asks for exactly that. It is the caller's mistake, a 404 like the other lookups, and as a 500 it turns up in the production check as a server error.Fixed in
4db5ee5: both answer 404 "no file {id}". Deployed as 0.10.3-dev on 2026-10-09.