public async Task <Result <MyPortfolio> > GetMyPortfolio(string sessionId) { this.logger.LogDebug("GetMyPortfolio"); try { var res = await client.GetMyPortfolio(sessionId); var isAuthorized = CheckAuthorization(res); if (!isAuthorized) { return(Result <MyPortfolio> .Failure(new UnauthorizedAccessException())); } return(Result <MyPortfolio> .Success(converter.ParseMyPortfolio(res))); } catch (Exception e) { this.logger.LogError(e, "GetMyPortfolio"); return(Result <MyPortfolio> .Failure(e)); } }