Catch some conflict check errors more gracefully

Description

In the AdminUI, if you schedule a recurrent event with the start & end date on the same day, not the same day of week as the recurrent event, you get an appropriate UI error (Scheduling error: The event has already ended), but also this long stack trace in the logs that's not really helpful.

POST to /admin-ng/event/new/conflicts with metadata like:

metadata: {"start":"2019-02-16T16:00:00Z","device":"alex1a","duration":"3300000","end":"2019-02-16T16:55:00Z","rrule":"FREQ=WEEKLY;BYDAY=WE;BYHOUR=16;BYMINUTE=0"}

and gets an http 500 internal server error back.

2019-02-16 17:39:31,597 | ERROR | qtp1466124335-1047 | (AbstractEventEndpoint:2235) - Unable to find conflicting events for jdaylt2, 2019-02-16T02:00:00Z, 2019-02-16T02:55: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:1185)
at org.opencastproject.scheduler.impl.SchedulerServiceImpl.findConflictingEvents(SchedulerServiceImpl.java:1165)
at org.opencastproject.adminui.endpoint.AbstractEventEndpoint.getNewConflicts(AbstractEventEndpoint.java:2223)

Steps to reproduce

None

Status

Assignee

Stephen Marquard

Reporter

Stephen Marquard

Criticality

None

Tags (folksonomy)

None

Components

Fix versions

Affects versions

7.0

Priority

Major
Configure