logger.error("Failed to process admin request: " + e.getMessage(), e);
if (result == null || VoidMuleEvent.getInstance().equals(result))
{
result = new DefaultMuleMessage(NullPayload.getInstance(), (Map) null, muleContext);
}
result.setExceptionPayload(new DefaultExceptionPayload(e));
try
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
wireFormat.write(out, result, getEncoding());
return out.toByteArray();