feat: add no NAS failure reason and refactor Synology extension exception handling#1480
Merged
mengyushen merged 4 commits intoFeb 5, 2026
Conversation
mengyushen
requested changes
Jan 29, 2026
Collaborator
mengyushen
left a comment
There was a problem hiding this comment.
It looks like the standard exception classes already cover the scenarios we are handling. Would you mind replacing SynologyException with standard exceptions?
It would be great to avoid introducing custom exceptions if we don't strictly need them.
8db09f6 to
a46bd3e
Compare
Replaced Synology-specific exceptions (SynologyException and subclasses) with standard SPI exceptions (CopyExceptionWithFailureReason and subclasses) to align with the core framework and improve error reporting. Key changes: - Removed custom Synology exception classes and error codes. - Added handling for HTTP 413 (Payload Too Large) -> DestinationMemoryFullException. - Added handling for HTTP 422 (Unprocessable Entity) -> NoNasInAccountException - Updated Importers (Media, Photos, Videos) to re-throw exceptions instead of catching and returning failure results.
…or handling Key changes: - Updated exception assertions to use standard SPI exceptions. - Added SynologyDTPService tests for HTTP 413 and 422 scenarios. - Updated method signatures to include throws CopyExceptionWithFailureReason where necessary.
a46bd3e to
6a6f08d
Compare
mengyushen
reviewed
Feb 4, 2026
mengyushen
approved these changes
Feb 5, 2026
Collaborator
mengyushen
left a comment
There was a problem hiding this comment.
Thanks for making the switch to standard exceptions. I appreciate the update!
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.
Changes:
Core SPI Updates
NAS setup.
Synology Extension Refactoring
SynologyImportException, SynologyErrorCode) and replaced them with standard SPI exceptions:
forEach()by for-loopreadyAlbumMap.compute()by synchronized lock protected map operationsTesting