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
@ -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…
Reference in New Issue
Block a user