AdminUI event creation not catching general server error response to certain conflict checks

Steps to reproduce

Steps to reproduce:
1. Begin creating a recurring event in Admin UI (MULTIPLE_SCHEDULE).
2. Choose a date range shorter than a week (e.g. 2018-03-16 to 2018-03-18 for Friday to Sunday). Choose "Repeat on" days in such a way that they are outside of the chosen date range (Monday, Tuesday, Wednesday).
3. Complete event creation.

Actual Results:
Event creation fails.

Expected Results:
User should not be allowed to proceed from the event creation's "Source" tab.

Workaround (if any):
None.

Note that there is a server response of 500 to this syntactically correct, but semantically incorrect request (choosing days outside of the date range requested). As stated in the expectation above, admin UI should not allow the event creation request to proceed past the Source tab in this case.

On the other hand, I would expect a 400 Bad Request response - because that's basically what the request is - instead of the 500 response, which means "your request is valid, but the server could not process it for some reason". Short stack trace on the 500 response below

2018-03-16 11:47:45,794 | ERROR | qtp2142854772-8275 | (AbstractEventEndpoint:1880) - Unable to find conflicting events for beattie114, 2018-03-21T05:00:00Z, 2018-03-23T05:05:00Z: java.lang.IllegalArgumentException: Requirement 'periods' must hold true
at org.opencastproject.util.RequireUtil.requireTrue(RequireUtil.java:47)
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.findConflictingEvents(SchedulerServiceImpl.java:1572)
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.findConflictingEvents(SchedulerServiceImpl.java:1565)
at org.opencastproject.adminui.endpoint.AbstractEventEndpoint.getNewConflicts(AbstractEventEndpoint.java:1855)
at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)

Assignee

Unassigned

Reporter

duncan smith

Severity

Incorrectly Functioning Without Workaround