Skip to content

Commit

Permalink
Add API client code and exception(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
patchoulish committed Nov 7, 2024
1 parent 8ef1452 commit 950cf73
Show file tree
Hide file tree
Showing 3 changed files with 631 additions and 0 deletions.
67 changes: 67 additions & 0 deletions source/Firecrawl/FirecrawlException.cs
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;
}
}
}
Loading

0 comments on commit 950cf73

Please sign in to comment.