Repository navigation
Answer an unchecked backup failure in web mode with the documented error body - #72
Merged
Merged
Conversation
…ror body (#71) BackupController.createBackup caught only IOException, so an unchecked failure such as a GHException escaped to Spring Boot's default error handling, whose body has no message for the web UI to show. It now catches Exception, as the CLI and daemon already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (PR #72, head 5a88b98):
Judgment notes (no change made):
This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BackupController.createBackupnow catchesExceptioninstead of onlyIOException. An unchecked failure fromBackupService.backupUserRepositories(such as aGHExceptionraised by github-api while listing repositories) is answered with500and{ "success": false, "message": "Error: ..." }, asCOMMANDS.mddocuments, and nobackup-completedevent is reported. Previously the exception escaped to Spring Boot's default error handling, whose body carries nomessage, so the web UI showed onlyFailed to create backup..Exception; this brings the web endpoint in line with them.java.io.IOExceptionimport is removed.CHANGELOG.mdgains aFixedentry.Closes #71
Test plan
BackupControllerTest.createBackup_UncheckedFailure: a mockedIllegalStateExceptionproduces500,success: false,message: "Error: Unchecked test error", and nobackupCompleted()callmvn test -Dtest=BackupControllerTestran 17 tests with 1 error; with it restored, the test passesmvn test: 228 tests run, 0 failures, 0 errors, 1 skipped (pre-existing)Docs
COMMANDS.mdalready documents the500BackupResponsefor a failed backup without restricting the cause, so it now describes the behavior accurately and is not changed. No configuration, flag or endpoint is added, soCONFIG.md,USER_GUIDE.mdandREADME.mdare unaffected.Skipped issues
LICENSE): deferred, as in earlier cycles, because choosing the license text, copyright holder and year is a maintainer decision.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson