Skip to content

Commit c215f04

Browse files
committedMay 10, 2024
Create ApiExceptions
1 parent 0322c08 commit c215f04

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System.Net;
2+
3+
namespace CheckDrive.Web.Exceptions
4+
{
5+
public class ApiException : Exception
6+
{
7+
public HttpStatusCode StatusCode { get; private set; }
8+
9+
public ApiException(HttpStatusCode statusCode) : base()
10+
{
11+
StatusCode = statusCode;
12+
}
13+
14+
public ApiException(HttpStatusCode statusCode, string message) :
15+
base(message)
16+
{
17+
StatusCode = statusCode;
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)
Please sign in to comment.