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