using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WebMVC.Controllers { public class ApiController : Controller { public override void OnActionExecuted(ActionExecutedContext context) { // This is where I capture the error from the ApiService base.OnActionExecuted(context); } } }