public void OnPost() { Success = null; if (!ModelState.IsValid) { return; } try { Start(); Number = mathSvc.GetNthFibonacci(Sequence); End(); Success = true; } catch (Exception e) { Success = false; Message = $"Couldn't calculate the {Sequence}th Fibonacci Number"; } }