User profile service #2
1 changed files with 40 additions and 8 deletions
|
@ -1,38 +1,70 @@
|
||||||
namespace DrinkRateAPI.Exceptions;
|
namespace DrinkRateAPI.Exceptions;
|
||||||
|
|
||||||
public abstract class DrinkRateException : Exception;
|
public class DrinkRateException : Exception
|
||||||
|
{
|
||||||
|
public DrinkRateException() : base() { }
|
||||||
|
public DrinkRateException(string message) : base(message) { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 400 - Bad request
|
/// 400 - Bad request
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BadRequestException : DrinkRateException;
|
public class BadRequestException : DrinkRateException
|
||||||
|
{
|
||||||
|
public BadRequestException() : base() { }
|
||||||
|
public BadRequestException(string message) : base(message) { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 401 - Unauthenticated
|
/// 401 - Unauthenticated
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UnauthenticatedException : DrinkRateException;
|
public class UnauthenticatedException : DrinkRateException
|
||||||
|
{
|
||||||
|
public UnauthenticatedException() : base() { }
|
||||||
|
public UnauthenticatedException(string message) : base(message) { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 402 - Payment required
|
/// 402 - Payment required
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PaymentRequiredException : DrinkRateException;
|
public class PaymentRequiredException : DrinkRateException
|
||||||
|
{
|
||||||
|
public PaymentRequiredException() : base() { }
|
||||||
|
public PaymentRequiredException(string message) : base(message) { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 403 - Forbidden
|
/// 403 - Forbidden
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ForbiddenException : DrinkRateException;
|
public class ForbiddenException : DrinkRateException
|
||||||
|
{
|
||||||
|
public ForbiddenException() : base() { }
|
||||||
|
public ForbiddenException(string message) : base(message) { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 404 - Not found
|
/// 404 - Not found
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NotFoundException : DrinkRateException;
|
public class NotFoundException : DrinkRateException
|
||||||
|
{
|
||||||
|
public NotFoundException() : base() { }
|
||||||
|
public NotFoundException(string message) : base(message) { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 418 - I'm a teapot
|
/// 418 - I'm a teapot
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class IamATeapotException : DrinkRateException;
|
public class IamATeapotException : DrinkRateException
|
||||||
|
{
|
||||||
|
public IamATeapotException() : base() { }
|
||||||
|
public IamATeapotException(string message) : base(message) { }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 451 - Unavailable for lagal reasons
|
/// 451 - Unavailable for lagal reasons
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UnavailableForLagalReasonsException : DrinkRateException;
|
public class UnavailableForLagalReasonsException : DrinkRateException
|
||||||
|
{
|
||||||
|
public UnavailableForLagalReasonsException() : base() { }
|
||||||
|
public UnavailableForLagalReasonsException(string message) : base(message) { }
|
||||||
|
}
|
Loading…
Reference in a new issue