Adding more exception handling to the privacy request flow#7233
Merged
Adding more exception handling to the privacy request flow#7233
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Contributor
Greptile SummaryThis PR improves error visibility and handling throughout the privacy request lifecycle by adding execution log entries and proper error state transitions when failures occur during scheduling, processing, and post-processing steps. Key improvements:
Issues to address before merging:
Confidence Score: 4/5
Important Files Changed
|
src/fides/api/service/privacy_request/request_runner_service.py
Outdated
Show resolved
Hide resolved
JadeCara
approved these changes
Jan 16, 2026
Contributor
JadeCara
left a comment
There was a problem hiding this comment.
Cursor beat me to it but the temp code to cause an error should probably be removed before merging - other than that looks good to me.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
mfbrown
pushed a commit
that referenced
this pull request
Jan 27, 2026
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
JadeCara
pushed a commit
that referenced
this pull request
Jan 29, 2026
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
Ticket ENG-2403
Description Of Changes
This PR improves error visibility for privacy request scheduling and processing failures. Previously, when a privacy request failed to schedule (e.g., due to memory limits or Celery issues) or failed during post-processing steps, the request would get stuck in an invalid state without any indication in the activity timeline of what went wrong.
Key improvements:
errorstatus with a descriptive entry in the activity timelinerun_privacy_requestnow log descriptive errors to the activity timelineCode Changes
Backend - Scheduling error handling (
privacy_request_service.py):_handle_scheduling_failurehelper to mark privacy requests as errored and create execution log entries_log_scheduling_successhelper to create success execution log entries when scheduling succeedsqueue_privacy_requestin try/except to catch and handle scheduling failures_process_privacy_request_restartto raiseHTTPExceptionwith the actual error message on failurehandle_approvalto catch and log scheduling failures during initial request creationBackend - Processing error handling (
request_runner_service.py):MisconfiguredPolicyException(policy has no rules)BaseExceptioncatch-all in the main processing try blockClientUnsuccessfulExceptionandPydanticValidationError)Frontend (
useReprocessPrivacyRequest.ts):else ifblock that checked forerror_messagein the response - no longer needed since the backend now raises anHTTPExceptionwith the error message instead of returning a 200 with error statusFrontend (
RequestDetails.tsx):Frontend (
types.ts):error_messagefield fromPrivacyRequestEntitytypeSteps to Confirm
The tests should still pass. This PR is more to help troubleshoot stuck privacy requests that don't have any clear errors.
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works