70 lines
No EOL
1.8 KiB
C#
70 lines
No EOL
1.8 KiB
C#
namespace DrinkRateAPI.Exceptions;
|
|
|
|
public class DrinkRateException : Exception
|
|
{
|
|
public DrinkRateException() : base() { }
|
|
public DrinkRateException(string message) : base(message) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 400 - Bad request
|
|
/// </summary>
|
|
public class BadRequestException : DrinkRateException
|
|
{
|
|
public BadRequestException() : base() { }
|
|
public BadRequestException(string message) : base(message) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 401 - Unauthenticated
|
|
/// </summary>
|
|
public class UnauthenticatedException : DrinkRateException
|
|
{
|
|
public UnauthenticatedException() : base() { }
|
|
public UnauthenticatedException(string message) : base(message) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 402 - Payment required
|
|
/// </summary>
|
|
public class PaymentRequiredException : DrinkRateException
|
|
{
|
|
public PaymentRequiredException() : base() { }
|
|
public PaymentRequiredException(string message) : base(message) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 403 - Forbidden
|
|
/// </summary>
|
|
public class ForbiddenException : DrinkRateException
|
|
{
|
|
public ForbiddenException() : base() { }
|
|
public ForbiddenException(string message) : base(message) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 404 - Not found
|
|
/// </summary>
|
|
public class NotFoundException : DrinkRateException
|
|
{
|
|
public NotFoundException() : base() { }
|
|
public NotFoundException(string message) : base(message) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 418 - I'm a teapot
|
|
/// </summary>
|
|
public class IamATeapotException : DrinkRateException
|
|
{
|
|
public IamATeapotException() : base() { }
|
|
public IamATeapotException(string message) : base(message) { }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 451 - Unavailable for lagal reasons
|
|
/// </summary>
|
|
public class UnavailableForLagalReasonsException : DrinkRateException
|
|
{
|
|
public UnavailableForLagalReasonsException() : base() { }
|
|
public UnavailableForLagalReasonsException(string message) : base(message) { }
|
|
} |