public IHttpActionResult GetSeries() { List <string> result = null; try { result = PriIntegration.GetSeries(); } catch (InvalidOperationException e) { return(BadRequest(e.Message)); } catch (Exception) { return(InternalServerError()); } if (result == null) { return(NotFound()); } else { return(Ok(result)); } }