using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
namespace Octokit
{
///
/// Represents a "Login Attempts Exceeded" response returned from the API.
///
[Serializable]
[SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors",
Justification = "These exceptions are specific to the GitHub API and not general purpose exceptions")]
public class LoginAttemptsExceededException : ForbiddenException
{
///
/// Constructs an instance of LoginAttemptsExceededException
///
/// The HTTP payload from the server
public LoginAttemptsExceededException(IResponse response)
: base(response)
{
}
///
/// Constructs an instance of LoginAttemptsExceededException
///
/// The HTTP payload from the server
/// The inner exception
public LoginAttemptsExceededException(IResponse response, Exception innerException)
: base(response, innerException)
{
}
public override string Message
{
get { return ApiErrorMessageSafe ?? "Maximum number of login attempts exceeded"; }
}
///
/// Constructs an instance of LoginAttemptsExceededException
///
///
/// The that holds the
/// serialized object data about the exception being thrown.
///
///
/// The that contains
/// contextual information about the source or destination.
///
protected LoginAttemptsExceededException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}