The user-media/:fname/:class handler (cmd/web/main.go, around line 250) panics on any error from mediaServer.ServeImage. That includes the storage's not-found error for a name that doesn't exist, so gin's recovery middleware answers 500. In the cluster, the panic also sends a panic email.
Reproduction: GET /user-media/does-not-exist.webp/thumb returns 500.
Expected: 404 for an unknown name; only real storage failures should be a 5xx.
Pinned by the skipped test TestE4_UploadImage_UnknownName in e2e/api_test.go (W3).
The
user-media/:fname/:classhandler (cmd/web/main.go, around line 250) panics on any error frommediaServer.ServeImage. That includes the storage's not-found error for a name that doesn't exist, so gin's recovery middleware answers 500. In the cluster, the panic also sends a panic email.Reproduction:
GET /user-media/does-not-exist.webp/thumbreturns 500.Expected: 404 for an unknown name; only real storage failures should be a 5xx.
Pinned by the skipped test
TestE4_UploadImage_UnknownNameine2e/api_test.go(W3).