Perhaps it may be useful to protect against any new failures that could result from the response.getEntity().toString() code.  How about we check to make sure that we are in an "OK" vs "Error" condition (from SchedulerResource doing return Response.ok(...)) and check if the response / response.getEntity() are not null.