Table of Contents

Class XapiError

Namespace
Xapi
Assembly
Xapi.Core.dll

One problem found while reading or validating xAPI data.

public sealed record XapiError : IEquatable<XapiError>
Inheritance
XapiError
Implements
Inherited Members

Constructors

XapiError(string, string, string)

Creates an error.

public XapiError(string code, string path, string message)

Parameters

code string

A stable, lowercase dotted error code from XapiErrorCodes.

path string

A JSON path to the offending value; see Path.

message string

A human-readable English description.

Properties

Code

A stable, lowercase dotted error code from XapiErrorCodes.

public string Code { get; init; }

Property Value

string

Message

A human-readable English description. Not stable; match on Code.

public string Message { get; init; }

Property Value

string

Path

A JSON path to the offending value, for example $.context.contextAgents[0].relevantTypes. Batch errors start with the index, for example $[3].id. The one exception is AttachmentPayloadUnreferenced, whose path is an index into the attachment data sent with the Statements, such as attachments[0], because that data is not part of the JSON.

public string Path { get; init; }

Property Value

string

Methods

ToString()

Returns path: message (code).

public override string ToString()

Returns

string

A diagnostic string.