feat: añadir excepciones personalizadas para la API

This commit is contained in:
javiermengual 2025-12-29 16:37:46 +01:00
parent 05a964bbaa
commit 4cb4653e3b
5 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,9 @@
namespace DoliMiddlewareApi.Exceptions;
public class ApiException : Exception
{
public ApiException(string message) : base(message)
{
}
}

View File

@ -0,0 +1,8 @@
namespace DoliMiddlewareApi.Exceptions;
public class BadRequestException : Exception
{
public BadRequestException(string message) : base(message)
{
}
}

View File

@ -0,0 +1,8 @@
namespace DoliMiddlewareApi.Exceptions;
public class ForbiddenException : Exception
{
public ForbiddenException(string message) : base(message)
{
}
}

View File

@ -0,0 +1,8 @@
namespace DoliMiddlewareApi.Exceptions;
public class NotFoundException : Exception
{
public NotFoundException(string message) : base(message)
{
}
}

View File

@ -0,0 +1,8 @@
namespace DoliMiddlewareApi.Exceptions;
public class UnauthorizedException : Exception
{
public UnauthorizedException(string message) : base(message)
{
}
}