-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathForceAuthException.cs
More file actions
30 lines (26 loc) · 880 Bytes
/
ForceAuthException.cs
File metadata and controls
30 lines (26 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Net;
//using NetCoreForce.Client.Models;
namespace NetCoreForce.Client
{
public class ForceAuthException : Exception
{
public string ErrorCode { get; private set; }
public HttpStatusCode HttpStatusCode { get; private set; }
public ForceAuthException(string errorCode, string message)
: this (errorCode, message, new HttpStatusCode())
{
}
public ForceAuthException(string errorCode, string message, HttpStatusCode httpStatusCode)
: base(message)
{
ErrorCode = errorCode;
HttpStatusCode = httpStatusCode;
}
// private static Error ParseError(string error)
// {
// Error value;
// return Enum.TryParse(error.Replace("_", ""), true, out value) ? value : Error.Unknown;
// }
}
}