mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(apiv2): get rid of large asp.net bad request errors
should also fix it for v1 :)
This commit is contained in:
parent
e367ed6808
commit
8e1409bd17
1 changed files with 5 additions and 1 deletions
|
|
@ -62,7 +62,11 @@ namespace PluralKit.API
|
||||||
{
|
{
|
||||||
// ... though by default it messes up timestamps in JSON
|
// ... though by default it messes up timestamps in JSON
|
||||||
opts.SerializerSettings.DateParseHandling = DateParseHandling.None;
|
opts.SerializerSettings.DateParseHandling = DateParseHandling.None;
|
||||||
});
|
})
|
||||||
|
.ConfigureApiBehaviorOptions(options =>
|
||||||
|
options.InvalidModelStateResponseFactory = (context) =>
|
||||||
|
throw Errors.GenericBadRequest
|
||||||
|
);
|
||||||
|
|
||||||
services.AddApiVersioning();
|
services.AddApiVersioning();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue