namespace Cepis;
///
/// The API answered 5xx on every attempt.
///
public sealed class ServerErrorException : CepisException
{
/// Create the exception with a message and the status seen.
/// what went wrong
/// the HTTP status of the last attempt
public ServerErrorException(string message, int status)
: base(message)
{
Status = status;
}
/// Create the exception with a message, the status and a cause.
/// what went wrong
/// the HTTP status of the last attempt
/// the failure underneath
public ServerErrorException(string message, int status, Exception? innerException)
: base(message, innerException)
{
Status = status;
}
/// The HTTP status seen on the last attempt.
public int Status { get; }
}