You kick off background work from a controller action and it throws once the response has gone out. What is happening?
Detached ASP.NET Core background work can fail after the response because the request scope is disposed. Copy required values, create a fresh service scope, and run tracked work through IHostedService, BackgroundService or a durable queue.