public async Task <Result <AccountMarks> > GetMarks(string sessionId) { this.logger.LogDebug("GetMarks"); try { var res = await client.GetMarks(sessionId); var isAuthorized = CheckAuthorization(res); if (!isAuthorized) { return(Result <AccountMarks> .Failure(new UnauthorizedAccessException())); } return(Result <AccountMarks> .Success( converter.ParseMarks(res) ?? new AccountMarks(new Dictionary <string, IDictionary <string, IList <AccountMark> > >()) )); } catch (Exception e) { this.logger.LogError(e, "GetMarks"); return(Result <AccountMarks> .Failure(e)); } }