private bool ExtractStateObject(HTTPSourcedCommand c, out ClientState cs) { try { JObject jo = c.Data as JObject; cs = ClientState.InstantiateClientState(jo); return(true); } catch (Exception ex) { cs = null; Logger.Error($"During '{c.CommandType}' system was unable to handle client's information. Exception:{ex.ToString()}"); HTTPExternalInterface.HandleFailedStateMessage(new HTTPDestinedCommandStateEvent(MicroServices.ProcessingStatus.Failed, $"During '{c.CommandType}' system was unable to handle client's information.", c), true); } return(false); }