media.HandleUpload (pkg/media/upload.go) calls panic(err) when io.ReadAll on the upload reader fails, instead of returning the error. A client that drops the connection mid-upload turns into a recovered panic (and an admin panic notification) rather than an ordinary error response.
Repro: call HandleUpload with a valid user ID and an io.Reader whose Read returns an error.
Expected: HandleUpload returns the (wrapped) read error.
Pinned by a skipped test, TestHandleUpload_ReaderError, in pkg/media/upload_test.go.
media.HandleUpload(pkg/media/upload.go) callspanic(err)whenio.ReadAllon the upload reader fails, instead of returning the error. A client that drops the connection mid-upload turns into a recovered panic (and an admin panic notification) rather than an ordinary error response.Repro: call
HandleUploadwith a valid user ID and anio.ReaderwhoseReadreturns an error.Expected:
HandleUploadreturns the (wrapped) read error.Pinned by a skipped test,
TestHandleUpload_ReaderError, inpkg/media/upload_test.go.