mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 17:50:13 +00:00
Initial commit, basic proxying working
This commit is contained in:
parent
c3f6becea4
commit
a6fbd869be
109 changed files with 3539 additions and 359 deletions
29
Myriad/Rest/Exceptions/RatelimitException.cs
Normal file
29
Myriad/Rest/Exceptions/RatelimitException.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
|
||||
using Myriad.Rest.Ratelimit;
|
||||
|
||||
namespace Myriad.Rest.Exceptions
|
||||
{
|
||||
public class RatelimitException: Exception
|
||||
{
|
||||
public RatelimitException(string? message): base(message) { }
|
||||
}
|
||||
|
||||
public class RatelimitBucketExhaustedException: RatelimitException
|
||||
{
|
||||
public RatelimitBucketExhaustedException(Bucket bucket, TimeSpan retryAfter): base(
|
||||
"Rate limit bucket exhausted, request blocked")
|
||||
{
|
||||
Bucket = bucket;
|
||||
RetryAfter = retryAfter;
|
||||
}
|
||||
|
||||
public Bucket Bucket { get; }
|
||||
public TimeSpan RetryAfter { get; }
|
||||
}
|
||||
|
||||
public class GloballyRatelimitedException: RatelimitException
|
||||
{
|
||||
public GloballyRatelimitedException(): base("Global rate limit hit") { }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue