diff --git a/backend/src/Squidex/Config/Domain/SerializationServices.cs b/backend/src/Squidex/Config/Domain/SerializationServices.cs index 5f3c1303c..a2688d3ef 100644 --- a/backend/src/Squidex/Config/Domain/SerializationServices.cs +++ b/backend/src/Squidex/Config/Domain/SerializationServices.cs @@ -116,8 +116,11 @@ namespace Squidex.Config.Domain { ConfigureJson(c.GetRequiredService(), 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;