say NO to try-catch in controllers
- added ExceptionsMiddleware.cs - added more Exception types - removed all exceptions logic in controllers
This commit is contained in:
parent
eb271793ad
commit
55e82425a9
8 changed files with 75 additions and 20 deletions
|
|
@ -0,0 +1,10 @@
|
|||
namespace SurveyBackend.Services.Exceptions;
|
||||
|
||||
public class NotFoundException : ServiceException
|
||||
{
|
||||
public override int StatusCode => 404;
|
||||
|
||||
public NotFoundException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue