❔ confused about Error controller
Hi,
i was following a tutorial about building APIs and the tutor used a new controller named it ErrorsController and just inherited ControllerBase and whenever a problem happens with the service it automatically call the error endpoint while it wasn't specified anywhere i tried looking at the call stack but didn't get much of it.
Here is the code:
https://github.com/GhoulamMB/BuberBreakfast/blob/master/BuberBreakfast/Controllers/ErrorsController.cs
Thanks in advance.
GitHub
BuberBreakfast/ErrorsController.cs at master · GhoulamMB/BuberBreak...
Contribute to GhoulamMB/BuberBreakfast development by creating an account on GitHub.
8 Replies
Program.cs app.UseExceptionHandler("/error")

Handle errors in ASP.NET Core
Discover how to handle errors in ASP.NET Core apps.
That's where it's specified
i've never been that stupid in my life 

Tell me about it. Happens every hour
i completely forgot that i wrote it i think that's enough coding today
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.