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
Copy file name to clipboardExpand all lines: src/JsonApiDotNetCore.Annotations/Resources/Annotations/ResourceFieldAttribute.cs
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ internal set
68
68
publicobject?GetValue(objectresource)
69
69
{
70
70
ArgumentGuard.NotNull(resource);
71
+
AssertIsIdentifiable(resource);
71
72
72
73
if(Property.GetMethod==null)
73
74
{
@@ -82,17 +83,18 @@ internal set
82
83
{
83
84
thrownewInvalidOperationException(
84
85
$"Unable to get property value of '{Property.DeclaringType!.Name}.{Property.Name}' on instance of type '{resource.GetType().Name}'.",
85
-
exception);
86
+
exception.InnerException??exception);
86
87
}
87
88
}
88
89
89
90
/// <summary>
90
91
/// Sets the value of this field on the specified resource instance. Throws if the property is read-only or if the field does not belong to the specified
0 commit comments