Skip to content

fix(ci): guard exception resolve lookup#5

Merged
1634594707 merged 1 commit into
mainfrom
ci-v7-backend-test-fix
Jun 8, 2026
Merged

fix(ci): guard exception resolve lookup#5
1634594707 merged 1 commit into
mainfrom
ci-v7-backend-test-fix

Conversation

@1634594707

@1634594707 1634594707 commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Fixes the remaining backend CI failure in AdminDispatchControllerTest.\n\n- Allows non-reassign exception resolution to proceed without requiring a preloaded exception record\n- Keeps resolved-state guard when an exception is available\n- Requires exception lookup only for REASSIGN because taskId is needed\n\nValidated locally:\n- mvn -pl fsd-bootstrap -am test -DskipTests -B\n\nNote: full local tests are blocked by Java 25 + Mockito inline mock compatibility; GitHub Actions uses JDK 21.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved error handling for exception resolution to prevent invalid operations when exception records are missing or already resolved
    • Enhanced reassignment validation to ensure proper error responses when attempting to reassign non-existent exceptions

@1634594707
1634594707 merged commit 782831d into main Jun 8, 2026
1 of 2 checks passed
@1634594707
1634594707 deleted the ci-v7-backend-test-fix branch June 8, 2026 18:44
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 724ed319-b38f-4d2f-8fec-0898569bbebd

📥 Commits

Reviewing files that changed from the base of the PR and between 2b4cd32 and 224b7d3.

📒 Files selected for processing (1)
  • back/fsd-admin-api/src/main/java/com/fsd/admin/controller/AdminDispatchController.java

📝 Walkthrough

Walkthrough

resolveException method in AdminDispatchController now guards against null exception records. It checks if the fetched exception exists before validating its RESOLVED status, and throws DISPATCH_EXCEPTION_NOT_FOUND when the exception is missing during REASSIGN actions instead of proceeding with invalid logic.

Changes

Exception Resolution Validation

Layer / File(s) Summary
Null-safety guards in resolveException
back/fsd-admin-api/src/main/java/com/fsd/admin/controller/AdminDispatchController.java
resolveException adds a null check before accessing resolved status and throws DISPATCH_EXCEPTION_NOT_FOUND when exception is missing during REASSIGN actions, preventing null dereference and invalid reassignment logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A null check guards the dispatcher's way,
No more derefs that lead astray!
When exceptions vanish, we're clear and true,
REASSIGN won't stumble—defensive code through and through! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci-v7-backend-test-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant