fix(cases): resolve option_ref in closure validator and return 400 fr…#2576
Merged
jordan-umusu merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
…om update_case_simple
|
✅ No security or compliance issues detected. Reviewed everything up to aa4dd29. Security OverviewDetected Code Changes
|
daryllimyt
approved these changes
Apr 30, 2026
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.
Problem
core.cases.update_casereturned HTTP 500 when a workflow closed a case and supplied required dropdowns bydefinition_ref/option_refin the same payload.Two issues:
definition_refbut notoption_ref, so it wroteoption_id=Noneinto the merged map and falsely flagged thedropdown as missing.
update_case_simpledidn't catchTracecatValidationError, so it bubbled to the global handler as a 500 instead of a 4xx.Solution
option_ref→option_idinside the validator before merging.TracecatValidationErrorinupdate_case_simpleand return 400, matching the file's existing convention for validation failures.definition_ref+option_reffor a required-on-closure dropdown.Summary by cubic
Fix case closure validation to accept dropdown refs and return clear 400 errors for invalid closure data. You can now close a case by sending
definition_ref+option_reffor required dropdowns.option_refto option ID when validating required dropdowns on close.TracecatValidationErrorto HTTP 400 inupdate_case_simple.Written for commit aa4dd29. Summary will update on new commits. Review in cubic