We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d33c91 commit adf5b79Copy full SHA for adf5b79
src/Api/Setup/ApiServices.cs
@@ -1,3 +1,4 @@
1
+using System.Net;
2
using System.Text.Json;
3
using System.Text.Json.Serialization;
4
using System.Threading.RateLimiting;
@@ -106,7 +107,7 @@ public static void ConfigureServices(this IServiceCollection services)
106
107
108
opt.OnRejected = async (context, cancellationToken) =>
109
{
- context.HttpContext.Response.StatusCode = 429;
110
+ context.HttpContext.Response.StatusCode = (int)HttpStatusCode.TooManyRequests;
111
await context.HttpContext.Response
112
.WriteAsync("Too many requests. Please try again later.", cancellationToken)
113
.ConfigureAwait(false);
0 commit comments