-
Notifications
You must be signed in to change notification settings - Fork 0
FOLLOW-UP: Log file deletion errors in ConfirmDelete handler #272
Copy link
Copy link
Open
Labels
follow-upFollow-up task from PR reviewFollow-up task from PR reviewfrom-reviewIssue originated from PR reviewIssue originated from PR review
Description
Context
This follow-up task was identified during the review of PR #267.
Source PR: #267
PR Title: feat: add file upload & storage support (Roadmap 2.2)
Suggested by: @claude[bot]
Task Description
The generated ConfirmDelete handler ignores Store.Delete errors with _ = c.Store.Delete(...). While this is reasonable (the DB row is deleted regardless), a log.Printf would help operators detect orphaned files in storage.
Change in handler.go.tmpl:
// Current:
_ = c.Store.Delete(dbCtx, existing.Photo)
// Proposed:
if err := c.Store.Delete(dbCtx, existing.Photo); err != nil {
log.Printf("warning: failed to delete file from storage: %v", err)
}Same change needed in the Update handler's old-file cleanup path.
This issue was automatically created by prmonitor from PR review comments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
follow-upFollow-up task from PR reviewFollow-up task from PR reviewfrom-reviewIssue originated from PR reviewIssue originated from PR review