Source:
<code>public ExtensionInstanceList getInstances( @PathParam("job-name") final String jobName, @QueryParam("start") final String nominalStart, @QueryParam("end") final String nominalEnd, @DefaultValue("") @QueryParam("instanceStatus") String instanceStatus, @DefaultValue("") @QueryParam("fields") String fields, @DefaultValue("") @QueryParam("orderBy") String orderBy, @DefaultValue("") @QueryParam("sortOrder") String sortOrder, @DefaultValue("0") @QueryParam("offset") final Integer offset, @QueryParam("numResults") Integer resultsPerPage, @DefaultValue("") @QueryParam("doAs") String doAsUser) { resultsPerPage = resultsPerPage == null ? getDefaultResultsPerPage() : resultsPerPage; try { List<Entity> entities = getEntityList("", "", "", TAG_PREFIX_EXTENSION_JOB + jobName, "", doAsUser); HashSet<String> fieldSet = new HashSet<>(Arrays.asList(fields.toUpperCase().split(","))); ExtensionInstanceList instances = new ExtensionInstanceList(entities.size()); for (Entity entity : entities) { InstancesResult entityInstances = super.getStatus( entity.getEntityType().name(), entity.getName(), nominalStart, nominalEnd, null, null, "STATUS:" + instanceStatus, orderBy, sortOrder, offset, resultsPerPage, null); instances.addEntitySummary(new ExtensionInstanceList.EntitySummary( getEntityElement(entity, fieldSet), entityInstances.getInstances())); } return instances; } catch (FalconException | IOException e) { LOG.error("Error when listing instances of extension job: " + jobName + ": ", e); <START> throw FalconWebException.newAPIException(e, Response.Status.BAD_REQUEST); <END> } }</code><technical_language>this INTERNAL_SERVER_ERROR error is generated in server code while handling request</technical_language>

Target:
public ExtensionInstanceList getInstances( @PathParam("job-name") final String jobName, @QueryParam("start") final String nominalStart, @QueryParam("end") final String nominalEnd, @DefaultValue("") @QueryParam("instanceStatus") String instanceStatus, @DefaultValue("") @QueryParam("fields") String fields, @DefaultValue("") @QueryParam("orderBy") String orderBy, @DefaultValue("") @QueryParam("sortOrder") String sortOrder, @DefaultValue("0") @QueryParam("offset") final Integer offset, @QueryParam("numResults") Integer resultsPerPage, @DefaultValue("") @QueryParam("doAs") String doAsUser) { resultsPerPage = resultsPerPage == null ? getDefaultResultsPerPage() : resultsPerPage; try { List<Entity> entities = getEntityList("", "", "", TAG_PREFIX_EXTENSION_JOB + jobName, "", doAsUser); HashSet<String> fieldSet = new HashSet<>(Arrays.asList(fields.toUpperCase().split(","))); ExtensionInstanceList instances = new ExtensionInstanceList(entities.size()); for (Entity entity : entities) { InstancesResult entityInstances = super.getStatus( entity.getEntityType().name(), entity.getName(), nominalStart, nominalEnd, null, null, "STATUS:" + instanceStatus, orderBy, sortOrder, offset, resultsPerPage, null); instances.addEntitySummary(new ExtensionInstanceList.EntitySummary( getEntityElement(entity, fieldSet), entityInstances.getInstances())); } return instances; } catch (FalconException | IOException e) { LOG.error("Error when listing instances of extension job: " + jobName + ": ", e); throw FalconWebException.newAPIException(e, Response.Status.INTERNAL_SERVER_ERROR); } }