This commit is contained in:
@@ -62,6 +62,13 @@ namespace AyaNova
|
||||
config.Filters.Add(new AyaNova.Api.ControllerHelpers.ApiCustomExceptionFilter(AyaNova.Util.ApplicationLogging.LoggerFactory));
|
||||
});
|
||||
|
||||
//Prevent default model binding automatic 400 page so we can consistently show *our* error to our specs
|
||||
//https://docs.microsoft.com/en-us/aspnet/core/web-api/index?view=aspnetcore-3.1#automatic-http-400-responses
|
||||
MvcBuilder.ConfigureApiBehaviorOptions(options =>
|
||||
{
|
||||
options.SuppressModelStateInvalidFilter = true;
|
||||
});
|
||||
|
||||
_log.LogDebug("BOOT: init JSON");
|
||||
MvcBuilder.AddNewtonsoftJson(options =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user