public async Task <IActionResult> GetAllGroupsAsync() { try { return(Json(await _groupClient.GetAllGroupsAsync())); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(StatusCode(500, "Internal server error")); } }