public IActionResult GetNrActiveActivities(string type) { try { return(Ok(_statisticsRepository.GetNumberOfActiveActivities(type))); } catch (Exception ex) { _logger.LogCritical($"An exception was thrown: ", ex); return(StatusCode(500, "A problem happend while handeling your request.")); } }