JsonPatchError Class

Captures error message and the related entity and the operation that caused it.

Namespace
Microsoft.AspNetCore.JsonPatch
Assemblies
  • Microsoft.AspNetCore.JsonPatch

Syntax

public class JsonPatchError
class Microsoft.AspNetCore.JsonPatch.JsonPatchError

Constructors

JsonPatchError(System.Object, Microsoft.AspNetCore.JsonPatch.Operations.Operation, System.String)

Initializes a new instance of Microsoft.AspNetCore.JsonPatch.JsonPatchError.

Arguments:
public JsonPatchError(object affectedObject, Operation operation, string errorMessage)

Properties

Microsoft.AspNetCore.JsonPatch.JsonPatchError.AffectedObject

Gets the object that is affected by the error.

Return type:System.Object
public object AffectedObject { get; }
Microsoft.AspNetCore.JsonPatch.JsonPatchError.ErrorMessage

Gets the error message.

Return type:System.String
public string ErrorMessage { get; }
Microsoft.AspNetCore.JsonPatch.JsonPatchError.Operation

Gets the Microsoft.AspNetCore.JsonPatch.JsonPatchError.Operation that caused the error.

Return type:Microsoft.AspNetCore.JsonPatch.Operations.Operation
public Operation Operation { get; }