public async Task <IActionResult> GetAllProfiles() { try { var profiles = await _profileManager.GetAllProfiles(); var rsp = new ApiResponse <IEnumerable <UserProfile> > { StatusCode = ResponseCodes.Ok, Message = "User profiles retrieved ok", Data = profiles }; return(Ok(rsp)); } catch (Exception ex) { return(HandleError(ex)); //return HandleError(ex, "An error occured while retrieving profiles"); } }