fix(api): properly ignore exceptions that result in 400 status code

This commit is contained in:
spiral 2021-11-17 09:45:34 -05:00
parent 8df259a40d
commit 1d5943b6e1
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -106,7 +106,7 @@ namespace PluralKit.API
builder.RegisterInstance(InitUtils.BuildConfiguration(Environment.GetCommandLineArgs()).Build()) builder.RegisterInstance(InitUtils.BuildConfiguration(Environment.GetCommandLineArgs()).Build())
.As<IConfiguration>(); .As<IConfiguration>();
builder.RegisterModule(new ConfigModule<ApiConfig>("API")); builder.RegisterModule(new ConfigModule<ApiConfig>("API"));
builder.RegisterModule(new LoggingModule("api", cfg: new LoggerConfiguration().Filter.ByExcluding(exc => exc.Exception is PKError))); builder.RegisterModule(new LoggingModule("api", cfg: new LoggerConfiguration().Filter.ByExcluding(exc => exc.Exception.IsUserError())));
builder.RegisterModule(new MetricsModule("API")); builder.RegisterModule(new MetricsModule("API"));
builder.RegisterModule<DataStoreModule>(); builder.RegisterModule<DataStoreModule>();
builder.RegisterModule<APIModule>(); builder.RegisterModule<APIModule>();