public IActionResult Index() { string myThreemaId = this._configuration["Threema:ThreemaId"]; string mySecret = this._configuration["Threema:Secret"]; APIConnector apiConnector = new APIConnector(myThreemaId, mySecret, null); CreditsViewModel creditsViewModel; try { creditsViewModel = new CreditsViewModel() { Credits = apiConnector.LookupCredits() }; } catch (Exception ex) { creditsViewModel = new CreditsViewModel() { ErrorMessage = ex.Message }; } return(View(creditsViewModel)); }