mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-22 07:05:12 +00:00
Stop manufacturing Response objects just to create an exception
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
@@ -20,7 +19,7 @@ namespace Octokit
|
||||
/// Constructs an instance of TwoFactorChallengeFailedException
|
||||
/// </summary>
|
||||
public TwoFactorChallengeFailedException() :
|
||||
base(new Response { StatusCode = HttpStatusCode.Unauthorized })
|
||||
base(HttpStatusCode.Unauthorized, null)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,7 +28,7 @@ namespace Octokit
|
||||
/// </summary>
|
||||
/// <param name="innerException">The inner exception</param>
|
||||
public TwoFactorChallengeFailedException(Exception innerException)
|
||||
: base(new Response { StatusCode = HttpStatusCode.Unauthorized }, innerException)
|
||||
: base(HttpStatusCode.Unauthorized, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user