You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix validation error message when parsing function.json (V2) (#2536)
* fix to #2401
* removing unnecessary variable
* updating to reflect that both exceptions can be thrown
* Moving condition to exception filter, adding more details to enum parsing method
Copy file name to clipboardExpand all lines: src/WebJobs.Script/Binding/Extensibility/ScriptBindingContext.cs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ public ScriptBindingContext(JObject bindingMetadata)
96
96
}
97
97
else
98
98
{
99
-
thrownewFormatException($"Invalid value specified for binding property '{name}' of enum type {PrettyTypeName(typeof(TEnum))}.");
99
+
thrownewFormatException($"Error parsing function.json: Invalid value specified for binding property '{name}' of enum type {PrettyTypeName(typeof(TEnum))}.");
100
100
}
101
101
}
102
102
@@ -120,9 +120,9 @@ public ScriptBindingContext(JObject bindingMetadata)
thrownewFormatException($"Invalid value specified for binding property '{name}' of type {PrettyTypeName(typeof(TValue))}.",e);
125
+
thrownewFormatException($"Error parsing function.json: Invalid value specified for binding property '{name}' of type {PrettyTypeName(typeof(TValue))}.",e);
0 commit comments