diff --git a/src/Altinn.App.Core/Features/Validation/ExpressionValidator.cs b/src/Altinn.App.Core/Features/Validation/ExpressionValidator.cs index 28fbeb047..96329e6ea 100644 --- a/src/Altinn.App.Core/Features/Validation/ExpressionValidator.cs +++ b/src/Altinn.App.Core/Features/Validation/ExpressionValidator.cs @@ -67,9 +67,9 @@ public static IEnumerable Validate(JsonElement validationConfig validationIssues.Add(validationIssue); } } - catch + catch(Exception e) { - logger.LogError($"Error while evaluating expression validation for {resolvedField}"); + logger.LogError(e, "Error while evaluating expression validation for {resolvedField}", resolvedField); throw; } }