log.debug("Handling remote request: [{}] {}", id, exchange);
DC.put(RemoteScript.class, id);
try {
handler.handle(exchange);
}
catch (Throwable failure) {
// HACK: Ignore this package-private exception as it seems to happen normally
if ("sun.net.httpserver.StreamClosedException".equals(failure.getClass().getCanonicalName())) {
log.trace("Ignoring", failure);