feat: añadir excepciones personalizadas para la API
This commit is contained in:
parent
05a964bbaa
commit
4cb4653e3b
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace DoliMiddlewareApi.Exceptions;
|
||||||
|
|
||||||
|
public class ApiException : Exception
|
||||||
|
|
||||||
|
{
|
||||||
|
public ApiException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace DoliMiddlewareApi.Exceptions;
|
||||||
|
|
||||||
|
public class BadRequestException : Exception
|
||||||
|
{
|
||||||
|
public BadRequestException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace DoliMiddlewareApi.Exceptions;
|
||||||
|
|
||||||
|
public class ForbiddenException : Exception
|
||||||
|
{
|
||||||
|
public ForbiddenException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace DoliMiddlewareApi.Exceptions;
|
||||||
|
|
||||||
|
public class NotFoundException : Exception
|
||||||
|
{
|
||||||
|
public NotFoundException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
namespace DoliMiddlewareApi.Exceptions;
|
||||||
|
|
||||||
|
public class UnauthorizedException : Exception
|
||||||
|
{
|
||||||
|
public UnauthorizedException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue