private CCAColorPaletteResult ProcessWithRaptor(CCAColorPaletteRequest request) { TColourPalettes palettes; palettes.Transitions = new TColourPalette[0]; if (raptorClient.GetMachineCCAColourPalettes(request.ProjectId ?? VelociraptorConstants.NO_PROJECT_ID, request.assetId, request.startUtc, request.endUtc, request.liftId, out palettes)) { if (palettes.Transitions.Length == 0) { throw new ServiceException(HttpStatusCode.BadRequest, new ContractExecutionResult(ContractExecutionStatesEnum.InternalProcessingError, "Failed to process CCA data colour palettes request sent to Raptor.")); } return(new CCAColorPaletteResult(RaptorConverters.convertColorPalettes(palettes.Transitions))); } throw new ServiceException(HttpStatusCode.BadRequest, new ContractExecutionResult(ContractExecutionStatesEnum.InternalProcessingError, "Failed to process CCA data colour palettes request.")); }