-
-
Notifications
You must be signed in to change notification settings - Fork 100
[stable32] feat: improve async signing error handling #6589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Add StatusCacheService for caching file status during async operations. Add SignRequestErrorReporter for storing and retrieving per-file errors. Add ErrorPayloadBuilder for consistent error payloads. These services enable granular error tracking during background signing jobs and provide detailed feedback to users about which specific files failed and why. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add methods to set/get/clear errors for individual files and sign requests. Implement long-polling with error detection across envelope children. Add fallback to metadata when cache is not available. This allows the frontend to display specific error messages for each file in a multi-file signing workflow, improving user feedback. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Replace direct cache access with StatusCacheService dependency. Add getByEnvelopeChildrenAndIdentifyMethod to SignRequestMapper for querying child sign requests. This improves testability and centralizes status caching logic. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Inject ProgressService and SignRequestErrorReporter. Clear errors before signing and report errors on exceptions. Preserve detailed error messages with HTTP status codes. Background jobs now store specific error information that the frontend can retrieve and display to users. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update SignFileService, AsyncSigningService, and background jobs to inject StatusService explicitly instead of relying on internal creation. Improves dependency injection and testability. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add per-file error details to progress responses. Improve envelope progress with child file error aggregation. Change from short polling to long-polling for better efficiency. Users now see specific error messages for each file that fails during async signing, rather than generic failure messages. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Show individual file error messages with error icons. Improve polling logic to handle file-level errors gracefully. Switch to long-polling (immediate retry) for better responsiveness. Add error state detection to stop polling when appropriate. Users now see which specific files failed and why during batch signing operations. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Hide sidebar when async signing starts for cleaner UI. Keep async view visible on error to show per-file error details. Improve error handling flow in RequestSignatureTab. This prevents the UI from closing prematurely and allows users to see detailed error information for failed signing operations. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add comprehensive tests for ErrorPayloadBuilder and SignRequestErrorReporter. Cover error serialization, HTTP code extraction, and error storage/retrieval. Ensures error reporting services work correctly and maintain data integrity. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add tests for per-file error storage and retrieval. Test error fallback to metadata when cache unavailable. Add tests for envelope progress with file errors. Include long-polling tests with error detection. Validates that error tracking works across all progress calculation scenarios including envelopes and single files. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update SignJobCoordinatorTest with error reporting validation. Update SignFileServiceTest, StatusServiceTest, and RequestSignatureServiceTest to inject StatusCacheService and StatusService. Maintains test coverage after dependency injection changes. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add tests for envelope progress endpoint with error details. Test single file progress with error information. Validate error payload structure and HTTP responses. Test long-polling timeout behavior. Ensures controller correctly exposes per-file error information to the frontend via API endpoints. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update OpenAPI specifications and TypeScript types to reflect new error fields in FileProgressController responses. Generated from updated PHP annotations. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
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.
Backport of #6587
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.