Incident service returns internal server error if cascade=true requested for deleted workflow

Steps to reproduce

Steps to reproduce:

1. Request incidents for a deleted workflow, e.g.

/incidents/job/40547335.xml

You get a 200 OK response and an empty incidentTree, e.g.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><incidentTree xmlns="http://job.opencastproject.org"/>

2. Request the same but with cascade=true

You get an error 500 internal server error http response.

2015-01-23 09:30:53 ERROR [1212872757@qtp-371877246-9937] (AbstractIncidentService:135) - Error loading child jobs of 40547335: {}
2015-01-23 09:30:53 WARN [1212872757@qtp-371877246-9937] (IncidentServiceEndpoint:227) - Unable to get job incident for id 40547335: org.opencastproject.util.NotFoundException: Workflow '40547335' has been deleted

3.

Actual Results:

Internal Server Error

Expected Results:

Case 2 should be handled like Case 1 (i.e. 200 OK empty incidentTree). Or possibly both should behave differently, e.g. return 404 not found.

Internal Server Error should never be returned for a valid request.

Workaround (if any):

Activity

Show:
Stephen Marquard
April 14, 2017, 2:29 PM

Assignee

Unassigned

Reporter

Stephen Marquard

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Major
Configure