Commit b81dfd5
Fix 500 when initializing an occurrence on a draft recurring meeting template
InitOccurrenceService#draft_template_failure returned only a message
with no errors:, which crashed the API layer's
ErrorBase.create_and_merge_errors(call.errors) with an ArgumentError
("expected at least one error") when it tried to build a MultipleErrors
response from an empty error list. Every recurring meeting's template is
in draft state right after creation, so initializing its first occurrence
before moving the template out of draft always hit this 500 instead of a
clean 422.
Populate the recurring meeting's own errors object before returning
failure, matching the errors: shape used elsewhere in this service and
across the codebase.1 parent c46bb81 commit b81dfd5
2 files changed
Lines changed: 11 additions & 1 deletion
File tree
- modules/meeting
- app/services/recurring_meetings
- spec/services/recurring_meetings
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
| |||
0 commit comments