-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API client code and exception(s)
- Loading branch information
1 parent
8ef1452
commit 950cf73
Showing
3 changed files
with
631 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System; | ||
using System.Net; | ||
|
||
namespace Firecrawl | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public class FirecrawlException : | ||
Exception | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public HttpStatusCode? StatusCode { get; private init; } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
public FirecrawlException() : | ||
this( | ||
default) | ||
{ } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="statusCode"></param> | ||
public FirecrawlException( | ||
HttpStatusCode statusCode) : | ||
this( | ||
statusCode, | ||
default) | ||
{ } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="statusCode"></param> | ||
/// <param name="message"></param> | ||
public FirecrawlException( | ||
HttpStatusCode statusCode, | ||
string message) : | ||
this( | ||
statusCode, | ||
message, | ||
default) | ||
{ } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="statusCode"></param> | ||
/// <param name="message"></param> | ||
/// <param name="innerException"></param> | ||
public FirecrawlException( | ||
HttpStatusCode statusCode, | ||
string message, | ||
Exception innerException) : | ||
base( | ||
message, | ||
innerException) | ||
{ | ||
StatusCode = statusCode; | ||
} | ||
} | ||
} |
Oops, something went wrong.