Replace bare print() with logger.exception() in replace-audio error path - #12
Conversation
✅ Action performedReview finished.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe ChangesPersistence error handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This PR replaces an unstructured error print with structured exception logging and removes raw exception details from the HTTP response; no actionable merge-blocking risk remains. Suggested reviewers: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (20 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
Comment |
|
Re: CodeRabbit's "bind Checked directly against So Separately, CodeRabbit's "Linked Issues" flag is legitimate: #11 asks for all ~30 bare Generated by Claude Code |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
routes.pyreplace_audiosloppak persist error path — swapped the bareprint()for the codebase-standardlogging.getLogger("slopsmith.plugin.editor").exception(...)pattern (captures the full traceback;import logging as _eloginside the handler matchescreate_sloppak,autosync-gp, andrefine-sync), and replaced the client-visiblef"persist failed: {e}"with a generic"persist failed — see server logs"response.
The message change is more than cosmetic: the guarded block does shutil.copy2, yaml.safe_dump, and write_text, whose exceptions routinely embed absolute filesystem paths — the same leak create_sloppak explicitly documents guarding against at routes.py:6495. The frontend only renders data.error verbatim (src/replace-audio.js:108) and matches on nothing, so the reworded body plus unchanged 500 status breaks no client logic.
Big Pickle (free) | 𝕏
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- CHANGELOG entry for the replace-audio fix — added under
## [Unreleased]→### Fixed; the text accurately describes the newlogger.exception(...)handling and the generic"persist failed — see server logs"response, and the version/changelog pairing matches the ecosystem convention documented in the merged XSS-fix PR (PATCH bump + Unreleased entry for a fix). plugin.jsonversion 1.8.0 → 1.8.2 — a patch bump that correctly skips1.8.1, whichmainalready consumed with the merged upload-extension XSS fix (#13). The prior code change inroutes.pyis unchanged by this delta.
One informational note for the merge: main has since bumped the same plugin.json line to 1.8.1, so merging this branch as-is will produce a one-line conflict there — resolve it keeping 1.8.2, or rebase onto main first to avoid it. The CHANGELOG.md additions are non-adjacent and merge cleanly.
Big Pickle (free) | 𝕏

routes.pyhad one bareprint()call in thereplace-audiosloppak persist error handler, bypassing structured logging, correlation IDs, and log-level configuration.Changes
routes.pyline 7086: Replaceprint(f"[Editor] replace-audio sloppak persist failed: {e}")with thelogging.getLogger("slopsmith.plugin.editor").exception(...)pattern already used throughout the file (e.g.autosync-gp,refine-sync,create_sloppakhandlers)"persist failed — see server logs"instead (consistent with thecreate_sloppakhandler).exception()captures the full traceback automatically; the bareexcept Exception as ebinding is no longer needed.