Skip to content

Fix 500 when creating a meeting outcome with an invalid kind - #24771

Open
jtauschl wants to merge 1 commit into
opf:devfrom
jtauschl:fix/meeting-outcome-invalid-kind-crashes
Open

Fix 500 when creating a meeting outcome with an invalid kind#24771
jtauschl wants to merge 1 commit into
opf:devfrom
jtauschl:fix/meeting-outcome-invalid-kind-crashes

Conversation

@jtauschl

Copy link
Copy Markdown

Summary

Fixes OP-19964.

MeetingOutcome's kind enum was declared without validate: true, so assigning an unrecognized value raised a raw Rails ArgumentError instead of a normal ActiveModel validation error, propagating uncaught through the API endpoint as a 500.

Change

Add validate: true to the enum declaration -- Rails then rejects an out-of-enum value through the usual validation path, returning a clean 422.

Test plan

  • Added a regression request spec asserting a 422 (not a 500) for an invalid kind, and that no outcome is created
  • Verified live against a real 17.7.1 instance: before the fix, invalid kind → 500; after the fix → 422 ("Kind is not set to one of the allowed values."); a valid kind still creates successfully

MeetingOutcome's kind enum was declared without validate: true, so
assigning an unrecognized value raised a raw Rails ArgumentError
instead of a normal ActiveModel validation error, propagating uncaught
through the API endpoint as a 500.

Add validate: true to the enum declaration -- Rails then rejects an
out-of-enum value through the usual validation path, returning a clean
422.
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@jtauschl

Copy link
Copy Markdown
Author

recheck

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant