© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
3 replies
Sander

What is the best way to return errors in api controllers?

What is the best way to return errors in asp.net core api controllers?

i currently use
return Problem("Some error message", statusCode: 400);
return Problem("Some error message", statusCode: 400);


But are the better ways to do it?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

The best way to handle Errors in Clean Arch
C#CC# / help
3y ago
✅ What is the best way to learn c/c#?
C#CC# / help
3y ago
✅ What is the best way to store basic C#?
C#CC# / help
3y ago