Browse Source

Fix error handling.

pull/932/head
Sebastian 4 years ago
parent
commit
a83b67d06d
  1. 5
      backend/src/Squidex/Config/Domain/SerializationServices.cs

5
backend/src/Squidex/Config/Domain/SerializationServices.cs

@ -116,8 +116,11 @@ namespace Squidex.Config.Domain
{
ConfigureJson(c.GetRequiredService<TypeNameRegistry>(), options.JsonSerializerOptions);
// Do not write null values.
options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
options.AllowInputFormatterExceptionMessages = true;
// Expose the json exceptions to the model state.
options.AllowInputFormatterExceptionMessages = false;
});
return builder;

Loading…
Cancel
Save